LabCleaningBot: add unfulfillable_tasks to sync_members_and_tasks()
This commit is contained in:
parent
00d16561d5
commit
d7b22f3bc5
5
main.py
5
main.py
@ -231,6 +231,8 @@ class LabCleaningBot:
|
||||
print("Websockets connection closed. Reestablishing connection.")
|
||||
|
||||
async def sync_members_and_tasks(self, session: Session):
|
||||
unfulfillable_tasks = []
|
||||
|
||||
while True:
|
||||
sync_result = self.sync_members_as_active_users(session)
|
||||
|
||||
@ -243,8 +245,11 @@ class LabCleaningBot:
|
||||
reqs = task.create_additional_requests(utc_now(), session)
|
||||
|
||||
if is_err(reqs):
|
||||
if task not in unfulfillable_tasks:
|
||||
res = self.send_to_base_group("Could not fulfill task: " + task.name)
|
||||
|
||||
unfulfillable_tasks.append(task)
|
||||
|
||||
if is_err(res):
|
||||
print(res.unwrap_err())
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user