Class: SolidQueue::Scheduler

Inherits:
Processes::Base show all
Includes:
Processes::Runnable
Defined in:
lib/solid_queue/scheduler.rb

Defined Under Namespace

Classes: RecurringSchedule

Instance Attribute Summary collapse

Attributes inherited from Processes::Base

#name

Instance Method Summary collapse

Methods included from Processes::Runnable

#start, #stop

Methods included from Processes::Supervised

#supervised_by

Methods inherited from Processes::Base

#hostname, #kind, #pid, #stop

Methods included from AppExecutor

#handle_thread_error, #wrap_in_app_executor

Methods included from Processes::Registrable

#process_id

Methods included from Processes::Interruptible

#wake_up

Methods included from Processes::Procline

#procline

Constructor Details

#initialize(recurring_tasks:, **options) ⇒ Scheduler

Returns a new instance of Scheduler.



12
13
14
15
16
# File 'lib/solid_queue/scheduler.rb', line 12

def initialize(recurring_tasks:, **options)
  @recurring_schedule = RecurringSchedule.new(recurring_tasks)

  super(**options)
end

Instance Attribute Details

#recurring_scheduleObject

Returns the value of attribute recurring_schedule.



7
8
9
# File 'lib/solid_queue/scheduler.rb', line 7

def recurring_schedule
  @recurring_schedule
end

Instance Method Details

#metadataObject



18
19
20
# File 'lib/solid_queue/scheduler.rb', line 18

def 
  super.merge(recurring_schedule: recurring_schedule.task_keys.presence)
end