register_callback

toloka.streaming.observer.PoolStatusObserver.register_callback | Source code

register_callback(
self,
callback: Union[Callable[[Pool], None], Callable[[Pool], Awaitable[None]]],
changed_to: Pool.Status
)

Register given callable for pool status change to given value.

Parameters description

ParametersTypeDescription
callbackUnion[Callable[[Pool], None], Callable[[Pool], Awaitable[None]]]

Sync or async callable that pass Pool object.

changed_toPool.Status

Pool status value to register for.

  • Returns:

    The same callable passed as callback.

  • Return type:

    Union[Callable[[Pool], None], Callable[[Pool], Awaitable[None]]]

Last updated: August 28, 2023

Toloka-Kit
OverviewGetting API keyQuick start
Recipes
Reference
toloka.client
toloka.async_client
toloka.autoquality [autoquality]
toloka.metrics
toloka.streaming