prefect.server.orchestration.core_policy
CoreFlowPolicy
and CoreTaskPolicy
contain all default orchestration rules that
Prefect enforces on a state transition.
CoreFlowPolicyWithoutDeploymentConcurrency
priority
CoreFlowPolicy
priority
CoreTaskPolicy
priority
ClientSideTaskOrchestrationPolicy
priority
BackgroundTaskPolicy
priority
MinimalFlowPolicy
priority
MarkLateRunsPolicy
priority
MinimalTaskPolicy
priority
SecureTaskConcurrencySlots
before_transition
cleanup
ReleaseTaskConcurrencySlots
after_transition
SecureFlowConcurrencySlots
before_transition
cleanup
ReleaseFlowConcurrencySlots
after_transition
CacheInsertion
after_transition
before_transition
CacheRetrieval
before_transition
RetryFailedFlows
retries
has been
set and the run count has not reached the specified limit. The client will be
instructed to transition into a scheduled state to retry flow execution.
Methods:
before_transition
RetryFailedTasks
retries
has been
set, the run count has not reached the specified limit, and the client
asserts it is a retriable task run. The client will be instructed to
transition into a scheduled state to retry task execution.
Methods:
before_transition
EnqueueScheduledTasks
after_transition
RenameReruns
before_transition
CopyScheduledTime
before_transition
WaitForScheduledTime
delay_seconds
before attempting the transition again.
Methods:
before_transition
CopyTaskParametersID
before_transition
HandlePausingFlows
after_transition
before_transition
HandleResumingPausedFlows
after_transition
before_transition
UpdateFlowRunTrackerOnTasks
after_transition
HandleTaskTerminalStateTransitions
before_transition
cleanup
HandleFlowTerminalStateTransitions
before_transition
cleanup
PreventPendingTransitions
before_transition
EnsureOnlyScheduledFlowsMarkedLate
before_transition
PreventRunningTasksFromStoppedFlows
before_transition
EnforceCancellingToCancelledTransition
before_transition
BypassCancellingFlowRunsWithNoInfra
Cancelling
state is used to clean up infrastructure. If there is not infrastructure
to clean up, we can transition directly to Cancelled
. Runs that are Resuming
are in a
Scheduled
state that were previously Suspended
and do not yet have infrastructure.
Runs that are AwaitingRetry
are a Scheduled
state that may have associated infrastructure.
Methods:
before_transition
PreventDuplicateTransitions
before_transition