Module: DispatchPolicy::Bypass
- Defined in:
- lib/dispatch_policy/bypass.rb
Overview
Thread-local guard. When active, ActiveJob#enqueue calls within the block bypass the dispatch_policy around_enqueue and reach the real adapter.
Constant Summary collapse
- KEY =
:__dispatch_policy_bypass__
Class Method Summary collapse
Class Method Details
.active? ⇒ Boolean
19 20 21 |
# File 'lib/dispatch_policy/bypass.rb', line 19 def active? Thread.current[KEY] == true end |