Giacomo Chiarella
09/17/2024, 2:22 PMMarvin
09/17/2024, 2:23 PMpython
from prefect import task, flow
from prefect.states import Completed, Failed
@task
def example_task():
return Completed(message="Task completed successfully.")
@flow
def example_flow():
state = example_task.submit()
In this example, the state of example_task
will be considered when determining the final state of example_flow
.
For more detailed information, you can refer to the Prefect documentation:
- Prefect 2.x Task Runners
- Prefect 3.x Manage States
Feel free to ask if you have more questions or need further assistance!Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.
Powered by