KG
04/12/2024, 7:12 PMNate
04/12/2024, 7:42 PMpublish_as_work_pool
method on infra blocks to do this automatically! work pools serve the role infra blocks used to
• swap the start
command on any agents you're running:
◦ prefect agent start -q my-queue
-> prefect worker start -p my-pool
• decide on whether you want to use prefect.yaml
(declarative) or .deploy()
(pythonic) to define deployments. you'll replace the storage block you might have attached to deployments in one of two ways depending on this choice:
◦ prefect.yaml
write a pull
step that tells your worker where to get flow code at runtime (e.g. git_clone
)
◦ .deploy()
use flow.from_source(source="<https://github.com/me/myrepo.git>", endpoint={as before}).deploy(...)
(deploy
is the worker way to do build_from_flow
)KG
04/12/2024, 8:04 PM