Is it possible to pause a flow, have the pause tim...
# ask-community
j
Is it possible to pause a flow, have the pause timeout, and not have the flow declared failed? it's a bit odd because the flow keeps going as usual, but has a "failed" status
n
hey @Josh Purtell! something like this? or are you thinking something else
Copy code
In [5]: from prefect import flow, pause_flow_run

In [6]: from prefect.exceptions import FlowPauseTimeout

In [7]: @flow
   ...: def f():
   ...:     try:
   ...:         pause_flow_run(timeout=3)
   ...:     except FlowPauseTimeout:
   ...:         print('its fine')
   ...:

In [8]: f()
12:30:09.636 | INFO    | prefect.engine - Created flow run 'rugged-jaguarundi' for flow 'f'
12:30:09.929 | INFO    | Flow run 'rugged-jaguarundi' - Pausing flow, execution will continue when this flow run is resumed.
its fine
12:30:14.046 | INFO    | Flow run 'rugged-jaguarundi' - Finished in state Completed()
🙌 1