Sha256: b253f0ded938db8a2b18bafedcf6994dd6486925aa843393ed724a52fe2bad23
Contents?: true
Size: 722 Bytes
Versions: 7
Compression:
Stored size: 722 Bytes
Contents
require "active_job/queue_adapter" class MissionControl::Jobs::Server include MissionControl::Jobs::IdentifiedByName include Serializable, RecurringTasks, Workers attr_reader :name, :queue_adapter, :application def initialize(name:, queue_adapter:, application:) super(name: name) @queue_adapter = queue_adapter @application = application end def activating(&block) previous_adapter = ActiveJob::Base.current_queue_adapter ActiveJob::Base.current_queue_adapter = queue_adapter queue_adapter.activating(&block) ensure ActiveJob::Base.current_queue_adapter = previous_adapter end def queue_adapter_name ActiveJob.adapter_name(queue_adapter).underscore.to_sym end end
Version data entries
7 entries across 7 versions & 1 rubygems