summary refs log tree commit diff
path: root/synapse/util/task_scheduler.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2023-11-20 10:09:33 +0000
committerErik Johnston <erik@matrix.org>2023-11-20 10:09:33 +0000
commit9c3b906b3aa13d83f3dc5eb080dc7e77d6d00511 (patch)
tree69de0f066bc3f30c6d70aedb08f8f8d612a44d38 /synapse/util/task_scheduler.py
parentMerge remote-tracking branch 'origin/develop' into matrix-org-hotfixes (diff)
parentSpeed up how quickly we launch new tasks (#16660) (diff)
downloadsynapse-9c3b906b3aa13d83f3dc5eb080dc7e77d6d00511.tar.xz
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
Diffstat (limited to 'synapse/util/task_scheduler.py')
-rw-r--r--synapse/util/task_scheduler.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/util/task_scheduler.py b/synapse/util/task_scheduler.py

index 29c561e555..b254d3f84c 100644 --- a/synapse/util/task_scheduler.py +++ b/synapse/util/task_scheduler.py
@@ -71,7 +71,7 @@ class TaskScheduler: # Time before a complete or failed task is deleted from the DB KEEP_TASKS_FOR_MS = 7 * 24 * 60 * 60 * 1000 # 1 week # Maximum number of tasks that can run at the same time - MAX_CONCURRENT_RUNNING_TASKS = 10 + MAX_CONCURRENT_RUNNING_TASKS = 5 # Time from the last task update after which we will log a warning LAST_UPDATE_BEFORE_WARNING_MS = 24 * 60 * 60 * 1000 # 24hrs @@ -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