Sha256: 4b618e10a0d39e5073ff292d91b3f852e13e1463b3f7a6148a85eaa9e9a1ff9d

Contents?: true

Size: 550 Bytes

Versions: 10

Compression:

Stored size: 550 Bytes

Contents

module MissionControl::Jobs::Server::RecurringTasks
  def recurring_tasks
    queue_adapter.recurring_tasks.collect do |task|
      MissionControl::Jobs::RecurringTask.new(queue_adapter: queue_adapter, **task)
    end.sort_by(&:id)
  end

  def find_recurring_task(task_id)
    if task = queue_adapter.find_recurring_task(task_id)
      MissionControl::Jobs::RecurringTask.new(queue_adapter: queue_adapter, **task)
    else
      raise MissionControl::Jobs::Errors::ResourceNotFound, "Recurring task with id '#{task_id}' not found"
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
mission_control-jobs-0.6.0 lib/mission_control/jobs/server/recurring_tasks.rb
mission_control-jobs-0.5.0 lib/mission_control/jobs/server/recurring_tasks.rb
mission_control-jobs-0.4.0 lib/mission_control/jobs/server/recurring_tasks.rb
mission_control-jobs-0.3.3 lib/mission_control/jobs/server/recurring_tasks.rb
mission_control-jobs-0.3.2 lib/mission_control/jobs/server/recurring_tasks.rb
mission_control-jobs-0.3.1 lib/mission_control/jobs/server/recurring_tasks.rb
mission_control-jobs-0.3.0 lib/mission_control/jobs/server/recurring_tasks.rb
mission_control-jobs-0.2.2 lib/mission_control/jobs/server/recurring_tasks.rb
mission_control-jobs-0.2.1 lib/mission_control/jobs/server/recurring_tasks.rb
mission_control-jobs-0.2.0 lib/mission_control/jobs/server/recurring_tasks.rb