Sha256: 9552fea900048629972cc7d30346d6cb8de235db6ae91298d8fefaa1dfffeb34
Contents?: true
Size: 1.03 KB
Versions: 16
Compression:
Stored size: 1.03 KB
Contents
require 'rails' module Eventsimple class Engine < ::Rails::Engine isolate_namespace Eventsimple config.generators do |g| g.test_framework :rspec g.helper false g.view_specs false end config.after_initialize do require 'eventsimple/reactor' verify_dispatchers! retry_intervals = Array.new(Eventsimple.configuration.max_concurrency_retries) { 0 } Retriable.configure do |c| c.contexts[:reactor] = { tries: 7, base_interval: 1.0, multiplier: 1.0, rand_factor: 0.0, on: ActiveRecord::RecordNotFound, } c.contexts[:optimistic_locking] = { intervals: retry_intervals, on: ActiveRecord::StaleObjectError, } end end def verify_dispatchers! unless Eventsimple.configuration.dispatchers.all? { |dispatcher| dispatcher < Eventsimple::Dispatcher } raise ArgumentError, 'dispatchers must inherit from Eventsimple::Dispatcher' end end end end
Version data entries
16 entries across 16 versions & 1 rubygems