Soham
10/09/2024, 6:47 PMMarvin
10/09/2024, 6:47 PMprefect work-pool create [OPTIONS] NAME
This command requires a unique name for the work pool and offers several optional parameters such as --paused
, --type
, --set-as-default
, and --base-job-template
.
2. Creating a Work Queue:
The process of creating work queues is also typically handled through UI or CLI commands, where you define the queue name, infrastructure type, priority, and concurrency limits etc.
Since creating work pools and queues isn't directly supported through native Python functions in Prefect, using the CLI is recommended. However, if you're automating task execution, you might script these CLI commands in a broader Python script.
For more detailed information, you can visit the Prefect documentation:
- Prefect 3.x Work Pools: Link
- Prefect 2.x Work Pools: Link
Feel free to reach out if you have any more questions!Nate
10/09/2024, 7:30 PMSoham
10/09/2024, 7:33 PMto_deployment()
and apply()
to create the deployments. Since the project needs to support low resource needs I am not using deplo()
which bakes into docker. Is there a better way to do it?Nate
10/09/2024, 7:38 PMSince the project needs to support low resource needs I am not usingwhich bakes into dockerdeploy()
.deploy
doesn't need to bake your code into docker, you can say build=False
and push=False
and then instead of just
your_flow.deploy(...)
you can say
your_flow.from_source(
source="<https://www.github.com/you/yourrepo.git>",
entrypoint="path/relative/to/root/to_flow.py:flow_fn"
).deploy(
work_pool_name="your_pool", build=False, push=False
)
to pull your code from a repo, so then your work pool (if its a containerized runtime like docker, ecs, k8s) can specify an image
with your deps, that doesn't contain your flow code, because the flow code is cloned at runtimeNate
10/09/2024, 7:39 PMSoham
10/09/2024, 7:40 PM