Adoption#
Oban Pro is designed as a drop-in enhancement to Oban. Once you’ve installed the package and schema, you can start using Pro features with minimal changes.
Import in Your Application#
To use Pro features like smart concurrency or workflows, your application
must import oban_pro before creating jobs:
import oban_pro # Registers Pro extensions for uniqueness, workflows, etc.
When you import oban, it attempts to auto-import oban_pro if installed. However, explicitly
importing oban_pro ensures the extensions are registered regardless of your import patterns.
Note
Running oban start only affects the worker process. Your application process (where you call
enqueue) must also import oban_pro for features like uniqueness to work correctly.
Automatic Improvements#
Pro replaces several internal operations with optimized implementations that are enabled when you install the package:
Bulk Inserts — Enqueueing multiple jobs with
enqueue_manyuses a single optimized database operation rather than inserting jobs one at a time.Bulk Acking — Completing, cancelling, snoozing, etc. uses batched updates instead of individual queries per job.
Accurate Rescue — Orphaned jobs from node restarts or crashed queues are rescued immediately (~60 seconds) rather than waiting for a fixed timeout (5+ minutes). Long-running jobs won’t be rescued prematurely.
Unique Constraints — Unique jobs are enforced by a unique index, which guarantees uniqueness without race conditions, even for bulk inserts with
enqueue_many.
These optimizations reduce database round-trips and improve throughput, especially under high load or when processing large batches of jobs.
Multi-Process Execution#
Multi-process execution is built into Oban. Set --processes to run jobs across multiple Python
processes. See Multi-Process for configuration options and performance details.
oban start --processes 4
The obanpro start command still works for compatibility. It’s equivalent to oban start, but
defaults to one process per CPU core when --processes isn’t set.
Next Steps#
With Pro installed, you can start using its advanced features:
Smart Concurrency — Global limits, rate limiting, and partitioned queues
Workflows — Compose jobs with dependencies for complex pipelines