aboutsummaryrefslogblamecommitdiffstats
path: root/activejob/test/support/integration/jobs_manager.rb
blob: 4df34aaeb10fecb3555328bb9a96b5cebbab0ee4 (plain) (tree)


























                                                            
class JobsManager
  @@managers = {}
  attr :adapter_name

  def self.current_manager
    @@managers[ENV['AJADAPTER']] ||= new(ENV['AJADAPTER'])
  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