1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activejob/test/support/integration/adapters/async.rb
Jeremy Daer a66780bfff Active Job: smaller footprint for the dev/test async adapter
Use one shared worker pool for all queues with 0-#CPU workers rather
than separate pools per queue with 2-10*#CPU workers each.
2016-02-29 15:58:26 -07:00

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