Andrea Piccione
01/15/2025, 4:32 PMjob_variables = json.loads(secret.get()) | {"platform": "linux/arm64"}
schedule = MinimalDeploymentSchedule(
schedule=RRuleSchedule(
rrule=str(rrule(freq=WEEKLY, interval=1, wkst=MO, byhour=7, byminute=15, dtstart=dt(2024, 9, 2, 7, 15))), # noqa: DTZ001
timezone="Europe/London",
),
active="prod" in image,
)
await my_flow.deploy(
name="default",
work_pool_name="ecs-worker",
image=f"{image}",
schedules=[schedule],
build=False,
push=False,
job_variables=job_variables,
)
Marvin
01/15/2025, 4:32 PMMinimalDeploymentSchedule
and RRuleSchedule
from prefect.deployments
are incorrect. These classes are not available in the prefect.deployments
module. You might want to check the correct import paths or consider using alternative scheduling methods provided by Prefect 2.x.
2. ARM64 Image: While the documentation does not specifically mention ARM64 images, ensure that your ECS environment is properly configured to support ARM64 architecture. This is more of an AWS infrastructure concern than a Prefect-specific one.
3. Job Variables: The use of job_variables
seems appropriate, but ensure that the structure of the dictionary is compatible with what your ECS worker expects. The documentation suggests that template variables can be complex types like dictionaries and lists, so ensure your job_variables
is structured correctly.
For more detailed guidance, you can refer to the ECS Worker Guide and the scheduling concepts.
If you need further assistance with Prefect-specific configurations or finding alternative scheduling approaches, feel free to ask.