mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
taskhandler: remove dead code
This commit is contained in:
parent
8e2a9ecf76
commit
6d90a4cf20
1 changed files with 2 additions and 7 deletions
|
|
@ -519,19 +519,14 @@ class TaskHandler:
|
|||
bool: True if the removal completed successfully.
|
||||
|
||||
"""
|
||||
d = None
|
||||
# delete the task from the tasks dictionary
|
||||
if task_id in self.tasks:
|
||||
# if the task has not been run, cancel it
|
||||
self.cancel(task_id)
|
||||
del self.tasks[task_id] # delete the task from the tasks dictionary
|
||||
del self.tasks[task_id]
|
||||
# remove the task from the persistent dictionary and ServerConfig
|
||||
if task_id in self.to_save:
|
||||
del self.to_save[task_id]
|
||||
self.save() # remove from ServerConfig.objects
|
||||
# delete the instance of the deferred
|
||||
if d:
|
||||
del d
|
||||
self.save()
|
||||
return True
|
||||
|
||||
def clear(self, save=True, cancel=True):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue