Sha256: 53cbca93822b0a487b023fac8d50d3897ecea9675d7c8985c260a37155d49df8
Contents?: true
Size: 612 Bytes
Versions: 11
Compression:
Stored size: 612 Bytes
Contents
# frozen_string_literal: true module AcidicJob # NOTE: it is essential that this be a bare module and not an ActiveSupport::Concern # WHY? module PerformWrapper def perform(*args) @arguments = args # we don't want to run the `perform` callbacks twice, since ActiveJob already handles that for us if defined?(ActiveJob) && self.class < ActiveJob::Base super(*args) elsif defined?(Sidekiq) && self.class.include?(Sidekiq::Worker) run_callbacks :perform do super(*args) end else raise UnknownJobAdapter end end end end
Version data entries
11 entries across 11 versions & 1 rubygems