Class: RSpecQ::Formatters::WorkerHeartbeatRecorder

Inherits:
Object
  • Object
show all
Defined in:
lib/rspecq/formatters/worker_heartbeat_recorder.rb

Overview

Updates the respective heartbeat key of the worker after each example.

Refer to the documentation of WORKER_LIVENESS_SEC for more info.

Instance Method Summary collapse

Constructor Details

#initialize(worker) ⇒ WorkerHeartbeatRecorder

Returns a new instance of WorkerHeartbeatRecorder.



7
8
9
# File 'lib/rspecq/formatters/worker_heartbeat_recorder.rb', line 7

def initialize(worker)
  @worker = worker
end

Instance Method Details

#example_finishedObject



11
12
13
# File 'lib/rspecq/formatters/worker_heartbeat_recorder.rb', line 11

def example_finished(*)
  @worker.update_heartbeat
end