runtimepy.net.arbiter.housekeeping package#

Module contents#

A module implementing various housekeeping tasks for the connection-arbiter runtime.

class runtimepy.net.arbiter.housekeeping.ConnectionMetricsLogger(name: str, average_depth: int = 10, metrics: PeriodicTaskMetrics = None, period_s: float = 1.0, env: ChannelEnvironment = None)[source]#

Bases: ArbiterTask

A task for logging metrics.

app: AppInfo#
async dispatch() bool[source]#

Dispatch an iteration of this task.

async init(app: AppInfo) None[source]#

Initialize this task with application information.

class runtimepy.net.arbiter.housekeeping.ConnectionMetricsLoggerFactory[source]#

Bases: TaskFactory[ConnectionMetricsLogger]

A factory for the connection-metrics logger.

kind#

alias of ConnectionMetricsLogger

class runtimepy.net.arbiter.housekeeping.ConnectionMetricsPoller(name: str, manager: ConnectionManager, **kwargs)[source]#

Bases: ArbiterTask

A class that periodically polls connection metrics.

async dispatch() bool[source]#

Dispatch an iteration of this task.

runtimepy.net.arbiter.housekeeping.metrics_poller(manager: ConnectionManager, period_s: float = 0.1) ConnectionMetricsPoller[source]#

Create a metrics-polling task.