Skip to content

Commit

Permalink
Use single line if
Browse files Browse the repository at this point in the history
  • Loading branch information
bouwkast committed Oct 23, 2024
1 parent d14effb commit f2f8bc4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,7 @@ def on_start(span, event, _id, payload)

span.set_tag('EVENT', event)

if datadog_configuration[:cache_key_enabled]
set_cache_key(span, key, mapping[:multi_key])
end
set_cache_key(span, key, mapping[:multi_key]) if datadog_configuration[:cache_key_enabled]

rescue StandardError => e
Datadog.logger.error(e.message)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,7 @@ def trace(action, store, key: nil, multi_key: nil)

span.set_tag(Ext::TAG_CACHE_BACKEND, store) if store

if datadog_configuration[:cache_key_enabled]
set_cache_key(span, key, multi_key)
end
set_cache_key(span, key, multi_key) if datadog_configuration[:cache_key_enabled]

yield
end
Expand Down

0 comments on commit f2f8bc4

Please sign in to comment.