Sha256: 2a49376b5f86029698d77aefff70b42fb5ddf03cfdbab09543a9ff669e618ec4

Contents?: true

Size: 475 Bytes

Versions: 2

Compression:

Stored size: 475 Bytes

Contents

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

  attr_accessor :id, :job_class_name, :command, :arguments, :schedule, :last_enqueued_at, :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

2 entries across 2 versions & 1 rubygems

Version Path
mission_control-jobs-0.3.3 app/models/mission_control/jobs/recurring_task.rb
mission_control-jobs-0.3.2 app/models/mission_control/jobs/recurring_task.rb