Beat
struct BeatWhat the heartbeat thread needs.
Implements Movable
- Fields
url: Stringrun: Intowner: Stringinterval: Float64
__init__
def __init__(out self, url: String, run: Int, owner: String, interval: Float64) orca.heartbeatA run's heartbeat, kept fresh from a thread while the run's steps work.
Steps run on the main thread and can take minutes, so the heartbeat can't
wait for the next attempt to be recorded. Started as
TypedPool.start[beat](1, b) with a Beat, one thread opens a connection
of its own and updates runs.heartbeat every b.interval seconds until the
pool is shut down, which joins it. A failed update is retried on the next beat: a run whose
heartbeat goes stale can be resumed elsewhere, and this process then finds
out at its next attempt (see orca.state).
Beatstruct BeatWhat the heartbeat thread needs.
Implements Movable
url: Stringrun: Intowner: Stringinterval: Float64__init__def __init__(out self, url: String, run: Int, owner: String, interval: Float64) beatdef beat(worker: Int, mut b: Beat, stop: AtomicFlag) heartbeat_intervaldef heartbeat_interval(stale_seconds: Float64) -> Float64 Five beats per stale limit, so a few missed ones don't lose the run.