Skip to content

fix: CLI flag clash, route CLI job mutations through the library, track detached tasks - #33

Merged
CodingAnarchy merged 1 commit into
masterfrom
fix/cli-and-task-hygiene
Oct 8, 2026
Merged

CodingAnarchy merged 1 commit into
masterfrom
fix/cli-and-task-hygiene

Conversation

@CodingAnarchy

Copy link
Copy Markdown
Owner

Part of #31, part of #17

CLI (#31)

  • -q was both --queue and the global --quiet, so spawn stats/spawn pending (and archive ..., job purge) panicked in debug builds. --queue now uses -Q on those subcommands; long flags unchanged. New unit test runs Cli::command().debug_assert().
  • job retry/cancel, batch retry/cancel and maintenance dead-job cleanup / integrity fix no longer run raw UPDATE/DELETE with lowercase statuses. They select ids (read-only, capitalized statuses, bound queue name) and apply each change through retry_job, retry_dead_job, mark_job_dead, delete_job, so they get the PR fix(queue): enforce the job lifecycle state machine (#19 C3/H2/H3/H5/H6/M1–M3) #29 transition guards. Jobs that changed state meanwhile are skipped and reported.
  • Lowercase status literals in queue, monitor, job purge fixed; maintenance check priority check fixed (integer column).
  • DatabasePool now derives Clone.

Detached tasks (#17 M6)

  • New internal TaskTracker (JoinSet plus per-task supervisor): panics are logged and counted, tasks can be drained or aborted.
  • WebhookManager::shutdown(grace) / StreamManager::shutdown(grace) (new) stop listeners, wait for in-flight deliveries/batches, abort stragglers; task_panics() added. Additive API only.

Autoscaler zero interval (#17)

Already guarded (reaper and autoscaler intervals use .max(1ms) in worker.rs); no change.

Tests

clap debug_assert and -Q parsing, selector/SQL unit tests, DB-backed job_state_tests (Postgres and MySQL) for job retry/cancel and batch retry, TaskTracker tests, webhook/stream shutdown-drain, abort-after-grace and panic-observed tests.

🤖 Generated with Claude Code

…ueue; track webhook/stream tasks

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant