Durable.Queue.Sampler (Durable v1.5.0)
View SourceOnce a minute, records every queue's depth — ready, scheduled, running,
waiting — in durable.queue_samples, so backlog can be charted over time
(Durable.Stats.queue_history/1).
Every node runs a sampler; the row for a queue and minute is written by
whichever gets there first (ON CONFLICT DO NOTHING), so the cluster keeps
one sample per minute however many nodes there are. Samples and
Durable.Activity rows older than 7 days are deleted on the way.
Summary
Functions
Returns a specification to start this module under a supervisor.
Writes this minute's sample for every queue, unless another node already has. Returns the samples it computed.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec sample(Durable.Config.t()) :: [map()]
Writes this minute's sample for every queue, unless another node already has. Returns the samples it computed.