Sha256: e8c1b6b084b63a72e7f35a9d7896565ec59cb86734dfd73ae8fbecbc0385dd69
Contents?: true
Size: 677 Bytes
Versions: 17
Compression:
Stored size: 677 Bytes
Contents
# frozen_string_literal: true module AcidicJob # NOTE: it is essential that this be a bare module and not an ActiveSupport::Concern module PerformWrapper def perform(*args, **kwargs) @__acidic_job_args = args @__acidic_job_kwargs = kwargs # 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, **kwargs) elsif defined?(Sidekiq) && self.class.include?(Sidekiq::Worker) run_callbacks :perform do super(*args, **kwargs) end else raise UnknownJobAdapter end end end end
Version data entries
17 entries across 17 versions & 1 rubygems