Raimundo Pereira De Souza Neto
03/24/2022, 2:21 PMfrom prefect import flow
from prefect.deployments import DeploymentSpec
from prefect.orion.schemas.schedules import IntervalSchedule
from datetime import timedelta
@flow(name="TestingFlow")
async def testing_flow(name="raimundo"):
try:
print(f"Hello {name}!")
except Exception as e:
print(e)
DeploymentSpec(
flow=testing_flow,
name="hw-30s",
schedule=IntervalSchedule(interval=timedelta(seconds=20)),
tags=["rai", "20s"],
)
when I run prefect deployment create my_file.py
, that creates it correctly, but the tasks don't run.
Anyone help me please 💙orion dashboard
nicholas
03/24/2022, 2:24 PMRaimundo Pereira De Souza Neto
03/24/2022, 2:30 PM@task
async def print_hello(name):
print(f"Hello {name}!")
@flow(name="TestingFlow")
async def testing_flow(name="raimundo"):
print_hello(name)
DeploymentSpec(
flow=testing_flow,
name="hw-30s",
schedule=IntervalSchedule(interval=timedelta(seconds=20)),
tags=["rai", "20s"],
)
Hi @nicholas, with this code, I had the same result 😞 .nicholas
03/24/2022, 2:37 PMAnna Geller
03/24/2022, 2:52 PMprefect work-queue create SOME_NAME -t rai
this will output UUID and you can use that to start an agent that will pick up those late runs:
prefect agent start UUID
Raimundo Pereira De Souza Neto
03/24/2022, 3:05 PM