Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Some minor performance fixes for task schedular #16313

Merged
merged 13 commits into from
Sep 14, 2023
3 changes: 3 additions & 0 deletions synapse/util/task_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,9 @@ async def wrapper() -> None:
)
self._running_tasks.remove(task.id)

# Try launch a new task since we've finished with this one.
self._clock.call_later(1, self._launch_scheduled_tasks)
MatMaul marked this conversation as resolved.
Show resolved Hide resolved

if len(self._running_tasks) >= TaskScheduler.MAX_CONCURRENT_RUNNING_TASKS:
return

Expand Down