Skip to content

Commit

Permalink
Apply rubocop style autofix
Browse files Browse the repository at this point in the history
  • Loading branch information
ivoanjo committed Nov 1, 2021
1 parent 2202e38 commit a7801f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ddtrace/contrib/delayed_job/plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module DelayedJob
# DelayedJob plugin that instruments invoke_job hook
class Plugin < Delayed::Plugin
def self.instrument_invoke(job, &block)
return block.call(job) unless tracer && tracer.enabled
return yield(job) unless tracer && tracer.enabled

tracer.trace(Ext::SPAN_JOB, service: configuration[:service_name], resource: job_name(job),
on_error: configuration[:error_handler]) do |span|
Expand All @@ -29,7 +29,7 @@ def self.instrument_invoke(job, &block)
end

def self.instrument_enqueue(job, &block)
return block.call(job) unless tracer && tracer.enabled
return yield(job) unless tracer && tracer.enabled

tracer.trace(Ext::SPAN_ENQUEUE, service: configuration[:client_service_name], resource: job_name(job)) do |span|
set_sample_rate(span)
Expand Down

0 comments on commit a7801f8

Please sign in to comment.