- 1.0.0
- 1.1.6
- 1.2.6
- 2.0.3
- 2.1.0
- 2.2.1
- 2.3.8
- 3.0.0
- 3.0.9
- 3.1.0
- 3.2.1
- 3.2.8
- 3.2.13
- 4.0.2
- 4.1.8
- 4.2.1
- 4.2.7
- 4.2.9
- 5.0.0.1 (0)
- 5.1.7 (0)
- 5.2.3 (0)
- 6.0.0 (0)
- 6.1.3.1 (0)
- 6.1.7.7 (0)
- 7.0.0 (0)
- 7.1.3.2 (-38)
- 7.1.3.4 (0)
- What's this?
Active Job Async adapter
The Async adapter runs jobs with an in-process thread pool.
This is the default queue adapter. It’s well-suited for dev/test since it doesn’t need an external infrastructure, but it’s a poor fit for production since it drops pending jobs on restart.
To use this adapter, set queue adapter to :async:
config.active_job.queue_adapter = :async
To configure the adapter’s thread pool, instantiate the adapter and pass your own config:
config.active_job.queue_adapter = ActiveJob::QueueAdapters::AsyncAdapter.new \ min_threads: 1, max_threads: 2 * Concurrent.processor_count, idletime: 600.seconds
The adapter uses a Concurrent Ruby thread pool to schedule and execute jobs. Since jobs share a single thread pool, long-running jobs will block short-lived jobs. Fine for dev/test; bad for production.