my prefect server setup prefect-metrics.waow.tech
python orchestration
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

switch to prefect.yaml for deployment definitions

- add prefect.yaml with git_clone pull step and deployment config
- simplify flow code (remove from_source/deploy boilerplate)
- CI and justfile now use `prefect deploy --all`

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

zzstoatzz 337ab477 db03c489

+17 -14
+1 -1
.tangled/workflows/deploy.yml
··· 16 16 steps: 17 17 - name: register flows 18 18 command: | 19 - uv run --with prefect flows/diagnostics.py 19 + uv run --with prefect prefect --no-prompt deploy --all
+1 -12
flows/diagnostics.py
··· 1 - """simple diagnostic flow — runs every 5 minutes, prints system info.""" 1 + """simple diagnostic flow — prints system info.""" 2 2 3 3 import datetime 4 4 import os ··· 16 16 print(f"platform: {platform.platform()}") 17 17 print(f"pid: {os.getpid()}") 18 18 print(f"cwd: {os.getcwd()}") 19 - 20 - 21 - if __name__ == "__main__": 22 - flow.from_source( 23 - source="https://tangled.sh/zzstoatzz.io/my-prefect-server.git", 24 - entrypoint="flows/diagnostics.py:diagnostics", 25 - ).deploy( 26 - name="diagnostics", 27 - work_pool_name="kubernetes-pool", 28 - cron="*/5 * * * *", 29 - )
+1 -1
justfile
··· 143 143 # register flow deployments (run locally with PREFECT_API_URL + PREFECT_API_AUTH_STRING) 144 144 register-flows: 145 145 PREFECT_API_URL="https://$DOMAIN/api" PREFECT_API_AUTH_STRING="$AUTH_STRING" \ 146 - uv run --with prefect flows/diagnostics.py 146 + uv run --with prefect prefect --no-prompt deploy --all 147 147 148 148 # --- prefect resources (terraform) --- 149 149
+14
prefect.yaml
··· 1 + name: my-prefect-server 2 + 3 + pull: 4 + - prefect.deployments.steps.git_clone: 5 + repository: https://tangled.org/zzstoatzz.io/my-prefect-server 6 + branch: main 7 + 8 + deployments: 9 + - name: diagnostics 10 + entrypoint: flows/diagnostics.py:diagnostics 11 + work_pool: 12 + name: kubernetes-pool 13 + schedules: 14 + - cron: "*/5 * * * *"