You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In several places the logic which determines the state of a job is getting complicated because the sate is held in several places. It would probably improve readability to combine #executed? #succeeded? and #failed? under an Enum:
defrun
before_hook
raiseDoubleRun.new if executed
@state=State::Running
perform
rescueJobFailed@state=State::Failedrescue e : DoubleRunraise e
rescue e
log "Job failed! Raised #{e.class}: #{e.message}"
e.backtrace.each do |trace|
log trace
end@state=State::Failedelse@state=State::Succeededend
The text was updated successfully, but these errors were encountered:
In several places the logic which determines the state of a job is getting complicated because the sate is held in several places. It would probably improve readability to combine #executed? #succeeded? and #failed? under an Enum:
The text was updated successfully, but these errors were encountered: