Thomas Furmston
10/26/2021, 8:46 AMSylvain Hazard
10/26/2021, 8:50 AMThomas Furmston
10/26/2021, 8:51 AMThomas Furmston
10/26/2021, 8:52 AMThomas Furmston
10/26/2021, 8:53 AMThomas Furmston
10/26/2021, 8:54 AMSylvain Hazard
10/26/2021, 8:55 AMThomas Furmston
10/26/2021, 8:56 AMThomas Furmston
10/26/2021, 8:56 AMSylvain Hazard
10/26/2021, 8:57 AMAnna Geller
import pendulum
from prefect.engine.signals import RETRY
@task
def my_sensor(**kwargs):
# check some state of the world
if condition_not_met:
raise RETRY("Condition not met, retrying in 5 seconds.", start_time=pendulum.now().add(seconds=5))
Thomas Furmston
10/26/2021, 9:25 AMThomas Furmston
10/26/2021, 9:26 AMThomas Furmston
10/26/2021, 9:26 AMKevin Kho