Class: CloudwatchScheduler::Job
- Inherits:
-
ApplicationJob
- Object
- ApplicationJob
- CloudwatchScheduler::Job
- Defined in:
- lib/cloudwatch_scheduler/job.rb
Instance Method Summary collapse
-
#initialize(config: CloudwatchScheduler.global) ⇒ Job
constructor
A new instance of Job.
- #perform(job_to_spawn) ⇒ Object
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 |