mirror of
https://github.com/element-hq/synapse.git
synced 2024-12-21 03:42:55 +03:00
d80cd57c54
Currently, when a new scheduled task is added and its scheduled time has already passed, we set it to ACTIVE. This is problematic, because it means it will jump the queue ahead of all other SCHEDULED tasks; furthermore, if the Synapse process gets restarted, it will jump ahead of any ACTIVE tasks which have been started but are taking a while to run. Instead, we leave it set to SCHEDULED, but kick off a call to `_launch_scheduled_tasks`, which will decide if we actually have capacity to start a new task, and start the newly-added task if so.
1 line
43 B
Text
1 line
43 B
Text
Fix new scheduled tasks jumping the queue.
|