Not thread local
Author: ioquatixCreated Jul 19, 2024Updated Jul 8, 2026
This variable is not thread local.
I suggest you use a thread attribute, e.g. see https://github.com/rspec/rspec-support/pull/610 for what I suggest as the recommended approach: Thread.attr_accessor :sidekiq_capsule.
Source: sidekiq/sidekiq