View Source ProcessHub.Worker.Janitor (ProcessHub v0.5.0-beta)
Summary
Functions
Returns a specification to start this module under a supervisor.
Purges expired TTL cache entries from the given storage table.
Purges expired pending entries from the registry table.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec purge_expired_cache(:ets.tid()) :: :ok
Purges expired TTL cache entries from the given storage table.
Scans for 3-tuple entries {key, value, expire_timestamp} and removes
any where the timestamp has passed.
@spec purge_pending_registry(ProcessHub.hub_id()) :: :ok
Purges expired pending entries from the registry table.
This function scans the registry for entries with TTL (3-tuple format) and removes any that have expired. A warning is logged for each expired entry.