mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
a66780bfff
Use one shared worker pool for all queues with 0-#CPU workers rather than separate pools per queue with 2-10*#CPU workers each.
10 lines
208 B
Ruby
10 lines
208 B
Ruby
module AsyncJobsManager
|
|
def setup
|
|
ActiveJob::Base.queue_adapter = :async
|
|
ActiveJob::Base.queue_adapter.immediate = false
|
|
end
|
|
|
|
def clear_jobs
|
|
ActiveJob::Base.queue_adapter.shutdown
|
|
end
|
|
end
|