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 | Type | Description |
---|---|---|
callback | Union[Callable[[Pool], None], Callable[[Pool], Awaitable[None]]] | Sync or async callable that pass Pool object. |
changed_to | Pool.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