prefect.futures
as_completed
wait
futures
: The sequence of Futures to wait upon.timeout
: The maximum number of seconds to wait. If None, then there
is no limit on the wait time.resolve_futures_to_states
PrefectFutures
and build a
new collection with the same structure with futures resolved to their final states.
Resolving futures to their final states may wait for execution to complete.
Unsupported object types will be returned without modification.
resolve_futures_to_results
PrefectFutures
and build a
new collection with the same structure with futures resolved to their final results.
Resolving futures to their final result may wait for execution to complete.
Unsupported object types will be returned without modification.
PrefectFuture
add_done_callback
fn
: A callable that will be called with this future as its only argument when the future completes or is cancelled.result
state
task_run_id
wait
PrefectTaskRunFuture
state
task_run_id
PrefectWrappedFuture
add_done_callback
wrapped_future
PrefectConcurrentFuture
result
wait
PrefectDistributedFuture
add_done_callback
result
result_async
wait
wait_async
PrefectFlowRunFuture
add_done_callback
aresult
flow_run_id
result
state
wait
wait_async
PrefectFutureList
result
timeout
: The maximum number of seconds to wait for all futures to
complete.raise_on_failure
: If True
, an exception will be raised if any task run fails.TimeoutError
: If the timeout is reached before all futures complete.wait
timeout
: The maximum number of seconds to wait for all futures to
complete. This method will not raise if the timeout is reached.DoneAndNotDoneFutures