Skip to content

Allow selectively running specific queues - #140

Merged
reneklacan merged 2 commits into
mainfrom
selective-queue-runs
Aug 30, 2026
Merged

Allow selectively running specific queues#140
reneklacan merged 2 commits into
mainfrom
selective-queue-runs

Conversation

@reneklacan

@reneklacan reneklacan commented Aug 30, 2026

Copy link
Copy Markdown
Member

Summary

  • add a repeatable RuntimeBuilder::only_queue::<Q>() allowlist
  • run coordinators and cron scheduling only for selected queues
  • reject selected queues that were not registered
  • document the API and cover default, static, and dynamic queue behavior

Verification

  • cargo fmt --all -- --check
  • cargo clippy --all-features --workspace (passes with one pre-existing removed-lint warning)
  • cargo test -p oxana runtime::tests
  • cargo test -p oxana --test integration --no-run
  • cargo check --all-features --workspace

The Redis-backed integration test was compiled but not executed locally because REDIS_URL is not configured in this environment.


Note

Low Risk
Opt-in runtime filtering with unchanged default behavior; misconfiguration is caught at startup when a selected queue is not registered.

Overview
Adds RuntimeBuilder::only_queue::<Q>(), repeatable, so one worker process can register every queue and worker but only run coordinators (and related cron scheduling) for an allowlisted subset. With no only_queue calls, behavior is unchanged: all registered queues run.

RuntimeSettings stores a queue_allowlist; empty means “all queues.” runs_queue gates queue coordinators in the launcher; runs_static_queue skips cron loops whose target queue key is not selected. Selecting a dynamic queue is documented to include all discovered subqueues.

run() fails fast with ConfigError if any selected queue was never registered. Registration and catalog() still list every queue; only execution is filtered.

README documents the API; unit tests cover allowlist defaults, catalog unchanged, dynamic selection, and unregistered selection; an integration test asserts jobs on a non-selected queue stay enqueued.

Reviewed by Cursor Bugbot for commit 4fb39b0. Bugbot is set up for automated code reviews on this repo. Configure here.

@reneklacan
reneklacan enabled auto-merge August 30, 2026 20:06
@reneklacan
reneklacan merged commit 38a41a6 into main Aug 30, 2026
2 checks passed
@reneklacan
reneklacan deleted the selective-queue-runs branch August 30, 2026 20:07
reneklacan added a commit that referenced this pull request Aug 31, 2026
Allow selectively running specific queues
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.

2 participants