bral
client.create_flow_run(
flow_id="d7bfb996-b8fe-4055-8d43-2c9f82a1e3c7",
flow_run_name="docs example hello-world"
)
@task
def task1():
pass
with Flow() as flow:
task1()
task2()
...
client.register(flow, project_name='project')
name = f"name_{datetime.datetime.utc()}"
Kevin Kho
from prefect import Flow, task from prefect.tasks.prefect import RenameFlowRun def rename_handler(obj, new_state, old_state): if new_state.is_running(): RenameFlowRun().run(flow_run_name="new_name") return @task def first_task(): return 1 with Flow("test-flow", state_handlers=[rename_handler]) as flow: first_task()
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.