Santiago Gutierrez
11/11/2025, 5:55 AMfrom prefect.futures import wait
finished, not_done = wait(futures_list)Marvin
11/11/2025, 5:55 AMMarvin
11/11/2025, 5:59 AMwait returns a named tuple (done, not_done), so your finished, not_done = wait(futures_list) aligns with that ordering.
- Final vs non-final is defined in the Prefect 3.x state types table: https://docs.prefect.io/v3/concepts/states#state-types
- API ref for `wait`: https://docs.prefect.io/v3/api-ref/python/prefect-futures#prefect.futures.wait
Examples of state names that map to these types:
- Final: Completed/Cached/RolledBack → COMPLETED; Failed/TimedOut → FAILED; Crashed → CRASHED; Cancelled → CANCELLED
- Non-final: Scheduled/Late/AwaitingRetry/AwaitingConcurrencySlot/Resuming → SCHEDULED; Pending → PENDING; Running/Retrying → RUNNING; Paused/Suspended → PAUSED; Cancelling → CANCELLING