LemonRouter. RunCountTracker
(lemon_router v0.1.0)
View Source
Tracks run lifecycle counters via telemetry for the RunOrchestrator.counts/0 API.
Attaches to:
[:lemon, :run, :submit]— incrementsqueuedon submission[:lemon, :run, :start]— decrementsqueued, no-ops foractive(DynamicSupervisor owns that)[:lemon, :run, :stop]— incrementscompleted_today
A midnight reset timer clears completed_today at the start of each UTC day.
Summary
Functions
Returns a specification to start this module under a supervisor.
Returns the number of runs completed since the last midnight UTC reset.
Returns the current queued count (submissions that have not yet started).
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec completed_today() :: non_neg_integer()
Returns the number of runs completed since the last midnight UTC reset.
@spec queued() :: non_neg_integer()
Returns the current queued count (submissions that have not yet started).