Skip to content

Commit 0475b34

Browse files
committed
Hotfix: unless defined Sidekiq
1 parent 4315b72 commit 0475b34

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎lib/log_bench/railtie.rb‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ def set_current_request_id
9898
end
9999

100100
def setup_sidekiq_middleware
101-
# Use Sidekiq's built-in CurrentAttributes middleware
101+
return unless defined?(Sidekiq)
102+
102103
require "sidekiq/middleware/current_attributes"
103104
Sidekiq::CurrentAttributes.persist("LogBench::Current")
104105
end

0 commit comments

Comments
 (0)