Kaynağa Gözat

Speed up how quickly we launch new tasks (#16660)

Now that we're reducing concurrency (#16656), this is more important.
tags/v1.97.0rc1
Erik Johnston 6 ay önce
committed by GitHub
ebeveyn
işleme
6088303efb
Veri tabanında bu imza için bilinen anahtar bulunamadı GPG Anahtar Kimliği: 4AEE18F83AFDEB23
2 değiştirilmiş dosya ile 2 ekleme ve 1 silme
  1. +1
    -0
      changelog.d/16660.misc
  2. +1
    -1
      synapse/util/task_scheduler.py

+ 1
- 0
changelog.d/16660.misc Dosyayı Görüntüle

@@ -0,0 +1 @@
Reduce max concurrency of background tasks, reducing potential max DB load.

+ 1
- 1
synapse/util/task_scheduler.py Dosyayı Görüntüle

@@ -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


Yükleniyor…
İptal
Kaydet