Sha256: a2d7788bbe5c26f3f01a15debd65ca146b5dc92a886d0db72bec1598b2ca9b52
Contents?: true
Size: 392 Bytes
Versions: 2
Compression:
Stored size: 392 Bytes
Contents
# frozen_string_literal: true module Yael class DispatchJob < ActiveJob::Base retry_on ActiveRecord::Deadlocked queue_as :dispatch def perform(name:, stream:, payload:, created_at:, persist: true) event = Event.new name: name, stream: stream, payload: payload, created_at: created_at event.save! if persist Yael::Bus.shared.process(event) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
yael-0.0.3 | lib/yael/dispatch_job.rb |
yael-0.0.2 | lib/yael/dispatch_job.rb |