mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
taskhandler: check task membership directly
This commit is contained in:
parent
bae500c165
commit
53dbc57ba3
1 changed files with 1 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue