Remove the unneeded full tracking of history

Also use setdefault() to save a bunch of pain
Prevent a silly exhaustive history search on all channel times rather than just current users
This commit is contained in:
Marc Di Luzio 2024-08-13 00:12:30 +01:00
parent 503e899f19
commit f00216fffc
3 changed files with 40 additions and 68 deletions

View file

@ -176,7 +176,7 @@ def members_to_groups(matchees: list[Member],
return []
# Walk from the start of history until now trying to match up groups
for oldest_relevant_datetime in st.get_history_timestamps() + [datetime.now()]:
for oldest_relevant_datetime in st.get_history_timestamps(matchees) + [datetime.now()]:
# Attempt with each starting matchee
for shifted_matchees in iterate_all_shifts(matchees):