Continuum.Runtime.TimerWheel (continuum v0.5.0)

Copy Markdown View Source

Caches near-term durable timers and wakes runs when timers fire.

Postgres remains the source of truth. The wheel hydrates an ETS cache with timers due inside a short window, listens for continuum_timer_armed notifications, and schedules its next tick from the earliest cached timer. A periodic refresh rebuilds the cache, so a dropped Postgres notification can delay a timer by at most the refresh interval.

Summary

Functions

Returns a specification to start this module under a supervisor.

Fire due timers once.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

fire_due_once(opts \\ [])

@spec fire_due_once(keyword()) :: {:ok, non_neg_integer()} | {:error, term()}

Fire due timers once.