Sha256: edd46343946036982ba2069de0c32d801e9296a2667e9b0ec0879500108d8927
Contents?: true
Size: 1.02 KB
Versions: 7
Compression:
Stored size: 1.02 KB
Contents
# frozen_string_literal: true require 'active_support/lazy_load_hooks' ActiveSupport.on_load :active_job do require 'activejob/traceable/traceable' require 'activejob/traceable/logging_patch' ActiveJob::Base.public_send(:include, ActiveJob::Traceable) ActiveJob::Base.public_send(:include, ActiveJob::Traceable::LoggingPatch) end module ActiveJob module Traceable module_function def tracing_info_getter=(lambda) if lambda raise 'Tracing info getter should be callable' unless lambda.respond_to?(:call) raise 'Tracing info getter should contain a hash' unless lambda.call.is_a?(Hash) @tracing_info_getter = lambda else # Resets the value @tracing_info_getter = nil end end def tracing_info_setter=(lambda) if lambda raise 'Tracing info setter should be callable' unless lambda.respond_to?(:call) @tracing_info_setter = lambda else # Resets the value @tracing_info_setter = nil end end end end
Version data entries
7 entries across 7 versions & 1 rubygems