Class: Minitest::Distributed::PendingExecution

Inherits:
T::Struct
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/minitest/distributed/enqueued_runnable.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_xpending(xpending_result) ⇒ Object



20
21
22
23
24
25
26
27
# File 'lib/minitest/distributed/enqueued_runnable.rb', line 20

def self.from_xpending(xpending_result)
  new(
    worker_id: xpending_result.fetch("consumer"),
    entry_id: xpending_result.fetch("entry_id"),
    elapsed_time_ms: xpending_result.fetch("elapsed"),
    attempt: xpending_result.fetch("count"),
  )
end

Instance Method Details

#attempt_idObject



15
16
17
# File 'lib/minitest/distributed/enqueued_runnable.rb', line 15

def attempt_id
  "#{entry_id}/#{attempt}"
end