Syntropy.RetentionWorker (syntropy v0.3.0)

Copy Markdown

Periodic retention purge loop.

Runs one purge at boot — before the replay stores hydrate, so purged data never reappears in memory — and then hourly, honoring the stored policy on every cycle. The "session" policy only purges at boot; data accumulated during the current session is kept until the next restart.

Summary

Functions

Returns a specification to start this module under a supervisor.

Runs a purge cycle immediately with the current policy and returns the per-table deletion counts.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

purge_now()

@spec purge_now() :: Syntropy.Retention.purge_counts()

Runs a purge cycle immediately with the current policy and returns the per-table deletion counts.

start_link(opts \\ [])

@spec start_link(keyword()) :: GenServer.on_start()