Durable.NodeRegistry (Durable v2.0.2)

View Source

Keeps this instance's row in durable.nodes fresh, so operators can see which nodes are alive and which queues each runs.

A node heartbeats every 10 s and removes its row on a clean shutdown; list/1 reports a node as :missing once its heartbeat is 30 s old. Rows unseen for a day are deleted.

On boot it also checks the database schema: a library upgrade whose migrations haven't run is logged as an error naming the missing version.

Summary

Functions

Returns a specification to start this module under a supervisor.

Lists known nodes, newest heartbeat first, each with a :status of :alive or :missing and :running, the number of runs it holds a lock on.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

list(config)

@spec list(Durable.Config.t()) :: [map()]

Lists known nodes, newest heartbeat first, each with a :status of :alive or :missing and :running, the number of runs it holds a lock on.

start_link(opts)