Sha256: ed8626c16a45e028c4235188a4ac96a94844848f56bb37c2d539480812d3e63b

Contents?: true

Size: 743 Bytes

Versions: 12

Compression:

Stored size: 743 Bytes

Contents

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

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

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

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

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

    def recurring_tasks_supported?
      MissionControl::Jobs::Current.server.queue_adapter.supports_recurring_tasks?
    end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
mission_control-jobs-1.0.1 app/controllers/concerns/mission_control/jobs/adapter_features.rb
mission_control-jobs-1.0.0 app/controllers/concerns/mission_control/jobs/adapter_features.rb
mission_control-jobs-0.6.0 app/controllers/concerns/mission_control/jobs/adapter_features.rb
mission_control-jobs-0.5.0 app/controllers/concerns/mission_control/jobs/adapter_features.rb
mission_control-jobs-0.4.0 app/controllers/concerns/mission_control/jobs/adapter_features.rb
mission_control-jobs-0.3.3 app/controllers/concerns/mission_control/jobs/adapter_features.rb
mission_control-jobs-0.3.2 app/controllers/concerns/mission_control/jobs/adapter_features.rb
mission_control-jobs-0.3.1 app/controllers/concerns/mission_control/jobs/adapter_features.rb
mission_control-jobs-0.3.0 app/controllers/concerns/mission_control/jobs/adapter_features.rb
mission_control-jobs-0.2.2 app/controllers/concerns/mission_control/jobs/adapter_features.rb
mission_control-jobs-0.2.1 app/controllers/concerns/mission_control/jobs/adapter_features.rb
mission_control-jobs-0.2.0 app/controllers/concerns/mission_control/jobs/adapter_features.rb