Sha256: f69c213f225f6933710821178afb41f1bc1fa24a4fbd14e2fee481f64b5c3d50

Contents?: true

Size: 500 Bytes

Versions: 1

Compression:

Stored size: 500 Bytes

Contents

module CronoTrigger
  class ExecutionTracker
    def initialize(schedulable)
      @schedulable = schedulable
    end

    def track(&pr)
      if @schedulable.track_execution
        begin
          execution = @schedulable.crono_trigger_executions.create_with_timestamp!
          p "fuuuuuuu"
          pr.call
          p "hogehoge"
          execution.complete!
        rescue => e
          execution.error!(e)
          raise
        end
      else
        pr.call
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
crono_trigger-0.5.1 lib/crono_trigger/execution_tracker.rb