View Source Membrane.RTC.Engine.TimescaleDB.Cleaner (Membrane RTC Engine TimescaleDB plugin v0.2.0)
Worker responsible for deleting obsolete records from the database.
By default started under the application's supervision tree with params passed in :membreane_rtc_engine_timescaledb config (params passed in config, used to start worker, are these same, as expected by start/1 and start_link/1)
start/1 and start_link/1 functions expect a keyword list as an argument, with the following keys:
:repo(required) is a module, that usesEcto.Repo:cleanup_interval(default: 1 hour) is the number of seconds between database cleanups:metrics_lifetime(default: 24 hours) is the number of seconds that must pass from creation before each metric can be deleted during cleanup The keyword may also includeGenServeroptions, seeGenServer.option/0for reference.
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor.
Link to this section Types
@type option() :: GenServer.option() | {:cleanup_interval, pos_integer()} | {:metrics_lifetime, pos_integer()} | {:repo, module()}
@type options() :: [option()]
Link to this section Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec start(options()) :: GenServer.on_start()
@spec start_link(options()) :: GenServer.on_start()