Re-implement run state QUEUED and replace current QUEUED state with INITIALIZING #59
Labels
priority: medium
Medium priority
type flag: required by specs
Compliance with specs requires this change
type: maintenance
Related to general repository maintenance
workload: hours
Likely takes hours to resolve
Is your feature request related to a problem? Please describe.
Currently, the flow of states for new workflow runs starts with
UNKNOWN
, then proceeds toQUEUED
as soon as a worker picks up a task/run, and then almost instantly changes toRUNNING
whencwl-tes
execution is triggered in the background. However, with regard to stateQUEUED
, this flow makes little sense, because the actual queuing - when there is sufficient load and depending on the Celery config - happens on the broker, i.e., after a task is published but before a worker picks it up.Describe the solution you'd like
The signal
after_task_publish
should be leveraged to change a run's state toQUEUED
while the eventtask-received
would be used to bump the run state fromQUEUED
toINITIALIZING
(instead ofUNKNOWN
toQUEUED
as is currently the case). Note the difference between signals and events and that theafter_task_publish
signal is sent in the process sending the task, not by the worker.Describe alternatives you've considered
N/A
Additional context
N/A
The text was updated successfully, but these errors were encountered: