Module: IdempotencyCheck::ActiveJobPerformTracker

Defined in:
lib/idempotency_check/active_job_perform_tracker.rb

Overview

Accumulates every job actually performed (synchronously, e.g. via perform_now) since the last reset!, by subscribing to ActiveJob's core "perform.active_job" notification. This fires regardless of queue adapter, but with queue_adapter = :test it's the only way to see synchronous performs, since perform_later jobs just sit in the queue and never actually run.

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.performedObject (readonly)

Returns the value of attribute performed.



16
17
18
# File 'lib/idempotency_check/active_job_perform_tracker.rb', line 16

def performed
  @performed
end

Class Method Details

.reset!Object



19
20
21
# File 'lib/idempotency_check/active_job_perform_tracker.rb', line 19

def self.reset!
  @performed = []
end