taskhandler: check task membership directly

This commit is contained in:
Jake 2026-03-04 21:57:28 -08:00
parent bae500c165
commit 53dbc57ba3

View file

@ -388,9 +388,8 @@ class TaskHandler:
delta = timedelta(seconds=timedelay)
comp_time = now + delta
# get an open task id
used_ids = list(self.tasks.keys())
task_id = 1
while task_id in used_ids:
while task_id in self.tasks:
task_id += 1
# record the task to the tasks dictionary