module DelayedJobJobsManager
Public Instance Methods
clear_jobs()
click to toggle source
# File activejob/test/support/integration/adapters/delayed_job.rb, line 10 def clear_jobs Delayed::Job.delete_all end
setup()
click to toggle source
# File activejob/test/support/integration/adapters/delayed_job.rb, line 7 def setup ActiveJob::Base.queue_adapter = :delayed_job end
start_workers()
click to toggle source
# File activejob/test/support/integration/adapters/delayed_job.rb, line 14 def start_workers @worker = Delayed::Worker.new(quiet: true, sleep_delay: 0.5, queues: %w(integration_tests)) @thread = Thread.new { @worker.start } end
stop_workers()
click to toggle source
# File activejob/test/support/integration/adapters/delayed_job.rb, line 19 def stop_workers @worker.stop @thread.join end