Sha256: 816e0fdaee7f527490cc8595eee2855c38ac64f0b9fc6bbfdf5be14f9a8b1ddd

Contents?: true

Size: 503 Bytes

Versions: 1

Compression:

Stored size: 503 Bytes

Contents

# frozen_string_literal: true

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruby-on-quails-0.1.0 activejob/test/support/integration/jobs_manager.rb