Sha256: 0c9a40cfc9d48ef543d7742f6470841ba628a294f30ece204e40d7b3a1cc16ef

Contents?: true

Size: 365 Bytes

Versions: 3

Compression:

Stored size: 365 Bytes

Contents

class PeakFlowUtils::ActiveJobParametersLogging < PeakFlowUtils::ApplicationService
  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
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
peak_flow_utils-0.1.19 app/services/peak_flow_utils/active_job_parameters_logging.rb
peak_flow_utils-0.1.18 app/services/peak_flow_utils/active_job_parameters_logging.rb
peak_flow_utils-0.1.17 app/services/peak_flow_utils/active_job_parameters_logging.rb