mirror of
https://github.com/kestra-io/kestra.git
synced 2025-12-19 18:05:41 -05:00
fix(executions): set tasks to submitted after sending to the Worker
When computing the next tasks to run, all task runs are created in the CREATED state. Then when computed tasks to send to the worker, CREATED task runs are listed and converted into worker task. The issue is that on the next execution message, if tasks sent to the worker are still in CREATED (for ex because the Worker didn't start them yet), they would still be evaluted as to send to the worker. Setting them to a new SUBMITTED state would prevent them to be taken into account again until they are really terminated. This should avoid the deduplicateWorkerTask state but this is kept for now with a warning and would be removed later if it proves to work in all cases.
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
ALTER TABLE executions MODIFY COLUMN `state_current` ENUM (
|
||||
'CREATED',
|
||||
'RUNNING',
|
||||
'PAUSED',
|
||||
'RESTARTED',
|
||||
'KILLING',
|
||||
'SUCCESS',
|
||||
'WARNING',
|
||||
'FAILED',
|
||||
'KILLED',
|
||||
'CANCELLED',
|
||||
'QUEUED',
|
||||
'RETRYING',
|
||||
'RETRIED',
|
||||
'SKIPPED',
|
||||
'SUBMITTED'
|
||||
) GENERATED ALWAYS AS (value ->> '$.state.current') STORED NOT NULL;
|
||||
Reference in New Issue
Block a user