John Horn
02/24/2023, 11:43 PM@task(timeout_seconds=5)
def test_task_timeout(uuid: str):
logger = get_run_logger()
<http://logger.info|logger.info>(uuid)
time.sleep(10)
return 42
@flow(timeout_seconds=60)
def test_flow_timeouts(station_id: str):
logger = get_run_logger()
future = test_task_timeout.submit(uuid='uuid-123')
result = future.result()
<http://logger.info|logger.info>(result)
flow_context = context.get_run_context()
prefect_state_handler(future_object=future, context=flow_context)