Class: CloudwatchScheduler::Job

Inherits:
ApplicationJob
  • Object
show all
Defined in:
lib/cloudwatch_scheduler/job.rb

Instance Method Summary collapse

Constructor Details

#initialize(config: CloudwatchScheduler.global) ⇒ Job

Returns a new instance of Job.



7
8
9
# File 'lib/cloudwatch_scheduler/job.rb', line 7

def initialize(config: CloudwatchScheduler.global)
  @config = config
end

Instance Method Details

#perform(job_to_spawn) ⇒ Object



11
12
13
# File 'lib/cloudwatch_scheduler/job.rb', line 11

def perform(job_to_spawn)
  @config.tasks[job_to_spawn].invoke
end