Module: RocketJob::Plugins::StateMachine

Extended by:
ActiveSupport::Concern
Included in:
DirmonEntry, Job, Server, Sliced::Slice
Defined in:
lib/rocket_job/plugins/state_machine.rb

Overview

State machine for RocketJob

Define before and after callbacks for state machine events

Example: Supply a method name to call

class MyJob < RocketJob::Job before_fail :let_me_know

def let_me_know
 puts "Oh no, the job has failed with and exception"
end

end

Example: Pass a block

class MyJob < RocketJob::Job before_fail do puts "Oh no, the job has failed with an exception" end end