Sha256: 67e64253e3a3b9ce55f91e31e154286917764bca5b5f7ab5ee3ea317078ab543

Contents?: true

Size: 487 Bytes

Versions: 1

Compression:

Stored size: 487 Bytes

Contents

class MissionControl::Jobs::RecurringTask
  include ActiveModel::Model

  attr_accessor :id, :job_class_name, :command, :arguments, :schedule, :last_enqueued_at, :next_time, :queue_name, :priority

  def initialize(queue_adapter: ActiveJob::Base.queue_adapter, **kwargs)
    @queue_adapter = queue_adapter
    super(**kwargs)
  end

  def jobs
    ActiveJob::JobsRelation.new(queue_adapter: queue_adapter).where(recurring_task_id: id)
  end

  private
    attr_reader :queue_adapter
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mission_control-jobs-0.4.0 app/models/mission_control/jobs/recurring_task.rb