Toloka documentation


toloka.metrics.pool_metrics.WorkersByFilterOnPool | Source code

    pool_id: str,
    workers_name: Optional[str] = None,
    interval_hours: int = 1,
    toloka_client: Optional[TolokaClient] = None,
    atoloka_client: Optional[AsyncTolokaClient] = None,
    timeout: timedelta = ...

The number of active performers matching the pool filters for the last hours (default 1 hour)

Parameters Description

Parameters Type Description
pool_id str

From which pool track metrics.

workers_name Optional[str]

Metric name for a count of workers.

interval_hours int

Counts unical workers on this hours interval. Default 1.


How to collect this metrics:

def print_metric(metric_dict):
collector = MetricCollector([WorkersByFilterOnPool(pool_id, toloka_client=toloka_client)], print_metric)

Methods Summary

Method Description
get_line_names Returns a list of metric names that can be generated by this class instance.