Continuum.Runtime.Lease.Heartbeater (continuum v0.5.0)

Copy Markdown View Source

Renews leases owned by local workflow engines.

Engines register their acquired lease here. On each heartbeat, the process renews every registered lease with the same owner/token pair. If renewal fails because the row no longer matches, the engine is told to stop itself.

Summary

Functions

Returns a specification to start this module under a supervisor.

Renew all tracked leases immediately.

Track a lease for periodic renewal.

Stop tracking a run's lease.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

renew_once(instance)

Renew all tracked leases immediately.

This is mainly useful for deterministic tests and shutdown paths.

track(instance, lease, pid)

Track a lease for periodic renewal.

untrack(instance, run_id)

Stop tracking a run's lease.