mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-11-17 08:20:12 +00:00
* feat: add inherited low priority for background flows and scripts Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: keep a low flow priority over step priorities and align the -1 boundary Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: note the rolling-upgrade ordering and the renamed queue index Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * refactor: order low priority by stored values instead of a coalesce index Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: keep a runnable's own priority when its caller has none Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: do not pass a flow step's default priority on to the jobs it starts Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
8 lines
451 B
SQL
8 lines
451 B
SQL
-- Workers pull `ORDER BY priority DESC NULLS LAST`. A job without priority is pushed as 0 and
|
|
-- flow steps and dependency jobs as 1, so that a negative (low) priority sorts after the
|
|
-- former. Moves the jobs already queued to those values so they keep their place; a NULL left
|
|
-- behind would sort after every low-priority job.
|
|
UPDATE v2_job_queue
|
|
SET priority = CASE WHEN priority IS NULL THEN 0 ELSE 1 END
|
|
WHERE priority IS NULL OR priority = 0;
|