Sha256: d01268da7ac868a34f4df5c3fd001ffa161409770b6ad450057a0a523b501535
Contents?: true
Size: 754 Bytes
Versions: 10
Compression:
Stored size: 754 Bytes
Contents
module CronoTrigger class ExecutionTracker def initialize(schedulable) @schedulable = schedulable end def self.track(schedulable, &pr) new(schedulable).track(&pr) end def track(&pr) if @schedulable.track_execution begin execution = @schedulable.crono_trigger_executions.create_with_timestamp! result = pr.call case result when :ok execution.complete! when :retry execution.retrying! when :abort execution.aborted! else execution.complete! end rescue => e execution.error!(e) raise end else pr.call end end end end
Version data entries
10 entries across 10 versions & 1 rubygems