Skip to content

feat(ops): job queue prioritization (M7) - #34

Merged
ArianAr merged 2 commits into
mainfrom
feat/job-queue
Jul 16, 2026
Merged

feat(ops): job queue prioritization (M7)#34
ArianAr merged 2 commits into
mainfrom
feat/job-queue

Conversation

@ArianAr

@ArianAr ArianAr commented Jul 16, 2026

Copy link
Copy Markdown
Owner

Summary

Multi-job queue with rule priority and concurrent slot limit.

Closes #33

  • Rule field priority (higher starts first when slots free)
  • Engine queues jobs; GANTRY_MAX_CONCURRENT_JOBS / -max-concurrent-jobs (default 2)
  • Cancel works for queued (remove from wait list) and active jobs
  • Progress tab job queue panel + priority on rule form
  • Fix: transfers use engine lifetime context (not HTTP request context)

Test

  • go test ./...
  • Frontend build

Rules carry a priority; jobs wait when concurrent slots are full
(GANTRY_MAX_CONCURRENT_JOBS / -max-concurrent-jobs, default 2). Higher
priority dequeues first. Dashboard shows a live job queue with cancel.
Jobs no longer inherit the HTTP request context for transfer lifetime.

Closes #33
@ArianAr

ArianAr commented Jul 16, 2026

Copy link
Copy Markdown
Owner Author

Review notes

  • Priority is copied onto JobRun at enqueue time so later rule edits do not reshuffle already-queued work.
  • Max concurrent jobs defaults to 2; dispatch is lock-protected and re-enters on job completion.
  • Queued cancel removes from the in-memory wait list and marks the DB row cancelled (no cancel map entry until start).
  • Transfers use engine lifetime context so finishing the HTTP start response no longer cancels in-flight jobs.

Approve when CI is green.

@ArianAr
ArianAr enabled auto-merge (squash) July 16, 2026 19:01
@ArianAr
ArianAr merged commit da06107 into main Jul 16, 2026
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: multi-job queue prioritization UI (M7)

1 participant