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/jobs_manager.rb
Jeroen van Baarsen e380ac685b Changed the AJADAPTER to AJ_ADAPTER
* This allows for easier reading, since those are two words, so they should be
  split by _

Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
2015-02-22 16:11:21 +01:00

27 lines
472 B
Ruby

class JobsManager
@@managers = {}
attr :adapter_name
def self.current_manager
@@managers[ENV['AJ_ADAPTER']] ||= new(ENV['AJ_ADAPTER'])
end
def initialize(adapter_name)
@adapter_name = adapter_name
require_relative "adapters/#{adapter_name}"
extend "#{adapter_name.camelize}JobsManager".constantize
end
def setup
ActiveJob::Base.queue_adapter = nil
end
def clear_jobs
end
def start_workers
end
def stop_workers
end
end