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.

Link to this function

purge_expired_cache(misc_storage)

View Source
@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.

Link to this function

purge_pending_registry(hub_id)

View Source
@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.