Class: RailsExecution::Services::RemoveScheduledJob
- Inherits:
-
Object
- Object
- RailsExecution::Services::RemoveScheduledJob
- Defined in:
- lib/rails_execution/services/remove_scheduled_job.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(task) ⇒ RemoveScheduledJob
constructor
A new instance of RemoveScheduledJob.
Constructor Details
#initialize(task) ⇒ RemoveScheduledJob
Returns a new instance of RemoveScheduledJob.
5 6 7 |
# File 'lib/rails_execution/services/remove_scheduled_job.rb', line 5 def initialize(task) @task = task end |
Instance Method Details
#call ⇒ Object
9 10 11 12 13 |
# File 'lib/rails_execution/services/remove_scheduled_job.rb', line 9 def call return if task.jid.blank? task.update(jid: nil) if ::RailsExecution.configuration.scheduled_task_remover.call(task.jid) end |