@flow
decorator to it:
timeout_seconds
keyword argument.
Argument | Description |
---|---|
description | An optional string description for the flow. If not provided, the description is pulled from the docstring for the decorated function. |
name | An optional name for the flow. If not provided, the name is inferred from the function. |
retries | An optional number of times to retry on flow run failure. |
retry_delay_seconds | An optional number of seconds to wait before retrying the flow after failure. This is only applicable if retries is nonzero. |
flow_run_name | An optional name to distinguish runs of this flow; this name can be provided as a string template with the flow’s parameters as variables; you can also provide this name as a function that returns a string. |
task_runner | An optional task runner to use for task execution within the flow when you .submit() tasks. If not provided and you .submit() tasks, the ThreadPoolTaskRunner is used. |
timeout_seconds | An optional number of seconds indicating a maximum runtime for the flow. If the flow exceeds this runtime, it is marked as failed. Flow execution may continue until the next task is called. |
validate_parameters | Boolean indicating whether parameters passed to flows are validated by Pydantic. Default is True . |
version | An optional version string for the flow. If not provided, we will attempt to create a version string as a hash of the file containing the wrapped function. If the file cannot be located, the version will be null. |
Argument | Description |
---|---|
name | An optional name for the task. If not provided, the name is inferred from the function name. |
description | An optional string description for the task. If not provided, the description is pulled from the docstring for the decorated function. |
tags | An optional set of tags associated with runs of this task. These tags are combined with any tags defined by a prefect.tags context at task runtime. |
timeout_seconds | An optional number of seconds indicating a maximum runtime for the task. If the task exceeds this runtime, it will be marked as failed. |
cache_key_fn | An optional callable that, given the task run context and call parameters, generates a string key. If the key matches a previous completed state, that state result is restored instead of running the task again. |
cache_policy | An optional policy that determines what information is used to generate cache keys. Available policies include INPUTS , TASK_SOURCE , RUN_ID , FLOW_PARAMETERS , and NO_CACHE . Can be combined using the + operator. |
cache_expiration | An optional amount of time indicating how long cached states for this task are restorable; if not provided, cached states will never expire. |
retries | An optional number of times to retry on task run failure. |
retry_delay_seconds | An optional number of seconds to wait before retrying the task after failure. This is only applicable if retries is nonzero. |
log_prints | An optional boolean indicating whether to log print statements. |
name
and description
arguments to a task:
task_run_name
.