polling
Module to poll different functions.
This module contains function to poll for a specific outcome.
poll ¶
Polls wait_for
callable until it returns True.
Parameters:
-
target
(
typing.Callable[..., T]
) –Callable to poll target.
-
message
(
typing.Optional[typing.Callable[[T], str]]
) –Callable that takes target return value as input and transforms it to string displayed in progress bar.
-
wait_for
(
typing.Optional[typing.Callable[[T], bool]]
) –Callable that takes target return value as input and transforms it to boolean indicating whether polling is finished.
-
sleep
(
int
) –Time duration to wait between pools.