Sha256: 269557552b27335fb19f7fc88ebd057832802cffaa167daffc4c2fba623d8c00

Contents?: true

Size: 304 Bytes

Versions: 1

Compression:

Stored size: 304 Bytes

Contents

# frozen_string_literal: true

module ChronoTrigger
  class Worker < Concurrent::Actor::RestartingContext
    def on_message(event)
      Rails.logger.debug "ChronoTrigger: #{event.inspect}"
      event.perform(*event.args) if event.at.nil? || (event.before && event.at < event.before)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
chrono_trigger-1.0.0 lib/chrono_trigger/worker.rb