Class: PeakFlowUtils::ActiveJobParametersLogging

Inherits:
ApplicationService
  • Object
show all
Defined in:
app/services/peak_flow_utils/active_job_parameters_logging.rb

Instance Method Summary collapse

Instance Method Details

#performObject



2
3
4
5
6
7
8
9
10
11
12
# File 'app/services/peak_flow_utils/active_job_parameters_logging.rb', line 2

def perform
  ActiveJob::Base.class_eval do
    around_perform do |job, block|
      PeakFlowUtils::Notifier.with_parameters(active_job: {job_name: job.class.name, job_arguments: job.arguments}) do
        block.call
      end
    end
  end

  succeed!
end