diff options
| author | 2020-06-19 22:00:26 -0700 | |
|---|---|---|
| committer | 2020-06-19 22:06:53 -0700 | |
| commit | 4bb6bde1c79f3ffd3d452dd7ffe489d9b093f567 (patch) | |
| tree | c3dd2db077461434b565b59d0cedd9cd98c7a5c7 | |
| parent | Scheduler: directly take the awaitable to schedule (diff) | |
Scheduler: name tasks
Makes them easier to identify when debugging.
| -rw-r--r-- | bot/utils/scheduling.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/utils/scheduling.py b/bot/utils/scheduling.py index 70fb1972b..f2640ed5e 100644 --- a/bot/utils/scheduling.py +++ b/bot/utils/scheduling.py @@ -22,7 +22,7 @@ class Scheduler: self._log.debug(f"Did not schedule task #{task_id}; task was already scheduled.") return - task = asyncio.create_task(task) + task = asyncio.create_task(task, name=f"{self.name}_{task_id}") task.add_done_callback(partial(self._task_done_callback, task_id)) self._scheduled_tasks[task_id] = task |