Sha256: 82a0542896dcac784dc0da46a4880367c7253dcea73d23b335a1031d2c6e2fe5
Contents?: true
Size: 578 Bytes
Versions: 7
Compression:
Stored size: 578 Bytes
Contents
require "active_support/concern" module DistributeReads module JobMethods extend ActiveSupport::Concern included do before_perform do if DistributeReads.by_default if DistributeReads.makara3? Makara::Context.set_current(Makara::Context.generate) else Makara::Context.release_all end end end end class_methods do def distribute_reads(*args) around_perform do |_job, block| distribute_reads(*args) { block.call } end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems