aboutsummaryrefslogtreecommitdiffstats
path: root/activejob/test/support
diff options
context:
space:
mode:
authorJeremy Daer <jeremydaer@gmail.com>2016-02-28 11:45:16 -0700
committerJeremy Daer <jeremydaer@gmail.com>2016-02-29 15:58:26 -0700
commita66780bfff40ddaa1b2eed2f5f2e8b077558d761 (patch)
treea1add8bcd059ecb06b01ca78c15f00f024a3a0ec /activejob/test/support
parentb04d07337fd7bc17e88500e9d6bcd361885a45f8 (diff)
downloadrails-a66780bfff40ddaa1b2eed2f5f2e8b077558d761.tar.gz
rails-a66780bfff40ddaa1b2eed2f5f2e8b077558d761.tar.bz2
rails-a66780bfff40ddaa1b2eed2f5f2e8b077558d761.zip
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.
Diffstat (limited to 'activejob/test/support')
-rw-r--r--activejob/test/support/integration/adapters/async.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/activejob/test/support/integration/adapters/async.rb b/activejob/test/support/integration/adapters/async.rb
index 42beb12b1f..44ab98437a 100644
--- a/activejob/test/support/integration/adapters/async.rb
+++ b/activejob/test/support/integration/adapters/async.rb
@@ -1,9 +1,10 @@
module AsyncJobsManager
def setup
ActiveJob::Base.queue_adapter = :async
+ ActiveJob::Base.queue_adapter.immediate = false
end
def clear_jobs
- ActiveJob::AsyncJob::QUEUES.clear
+ ActiveJob::Base.queue_adapter.shutdown
end
end