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
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. |