Sha256: 08ce96599db49168f89f8db035bbd9d652a5021a0e1c862f64fe68de7cd2a082

Contents?: true

Size: 583 Bytes

Versions: 2

Compression:

Stored size: 583 Bytes

Contents

module MissionControl::Jobs::AdapterFeatures
  extend ActiveSupport::Concern

  included do
    helper_method :supported_job_statuses, :queue_pausing_supported?, :workers_exposed?
  end

  private
    def workers_exposed?
      MissionControl::Jobs::Current.server.queue_adapter.exposes_workers?
    end

    def supported_job_statuses
      MissionControl::Jobs::Current.server.queue_adapter.supported_statuses & ActiveJob::JobsRelation::STATUSES
    end

    def queue_pausing_supported?
      MissionControl::Jobs::Current.server.queue_adapter.supports_queue_pausing?
    end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mission_control-jobs-0.1.1 app/controllers/concerns/mission_control/jobs/adapter_features.rb
mission_control-jobs-0.1.0 app/controllers/concerns/mission_control/jobs/adapter_features.rb