lib/opentelemetry/instrumentation/resque/patches/resque_module.rb in opentelemetry-instrumentation-resque-0.3.0 vs lib/opentelemetry/instrumentation/resque/patches/resque_module.rb in opentelemetry-instrumentation-resque-0.3.1
- old
+ new
@@ -19,10 +19,10 @@
# Module to prepend to Resque singleton class
module ClassMethods
def push(queue, item)
# Check if the job is being wrapped by ActiveJob
# before retrieving the job class name
- job_class = if item[:class] == 'ActiveJob::QueueAdapters::ResqueAdapter::JobWrapper' && item[:args][0]&.is_a?(Hash)
+ job_class = if item[:class] == 'ActiveJob::QueueAdapters::ResqueAdapter::JobWrapper' && item[:args][0].is_a?(Hash)
item[:args][0]['job_class']
else
item[:class]
end