mirror of
https://github.com/element-hq/synapse.git
synced 2024-11-21 17:15:38 +03:00
Speed up how quickly we launch new tasks (#16660)
Now that we're reducing concurrency (#16656), this is more important.
This commit is contained in:
parent
d9dcfe2a35
commit
6088303efb
2 changed files with 2 additions and 1 deletions
1
changelog.d/16660.misc
Normal file
1
changelog.d/16660.misc
Normal file
|
@ -0,0 +1 @@
|
|||
Reduce max concurrency of background tasks, reducing potential max DB load.
|
|
@ -377,7 +377,7 @@ class TaskScheduler:
|
|||
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)
|
||||
self._clock.call_later(0.1, self._launch_scheduled_tasks)
|
||||
|
||||
if len(self._running_tasks) >= TaskScheduler.MAX_CONCURRENT_RUNNING_TASKS:
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue