ObanDoctor.Check.Worker.MissingQueue (oban_doctor v0.2.2)

Copy Markdown View Source

Checks for workers using queues that are not defined in the Oban configuration.

Workers should only use queues that are configured in the application's Oban setup. Using an undefined queue means the job will be inserted successfully but never processed - it will sit in the database indefinitely since no producer is configured to pick it up.

False Positives

This check performs static analysis of your config files. It may report false positives if:

  • You use dynamic queue configuration at runtime (e.g., Oban.start_link(queues: dynamic_queues()))
  • You use Oban Pro's DynamicQueues plugin to add queues at runtime

If you're using dynamic queues, you can disable this check or exclude specific workers.

How to Fix

Add the missing queue to your Oban configuration:

config :my_app, Oban,
  queues: [default: 10, my_missing_queue: 5]

See Oban queue configuration.

Configuration

In .oban_doctor.exs:

checks: [
  missing_queue: [
    # Disable the check entirely
    enabled: false,

    # Or exclude specific workers from this check
    excluded_workers: [MyApp.Workers.LegacyWorker]
  ]
]