alphaswarm-beat
Celery beat process responsible for time-based task dispatch. It writes to the same Redis broker the worker drains; nothing else writes schedule-driven payloads.
Identity
| Field | Value |
|---|---|
| Service id | alphaswarm-beat |
| Role | scheduler |
| Package | alphaswarm/ (schedule under alphaswarm/tasks/celery_app.py) |
| Image (key) | beat |
| Built from | alphaswarm_platform/Dockerfile (image key beat → target worker; beat shares the slim orchestration image) |
Wire
| Field | Value |
|---|---|
| Protocol | none |
| Health | Celery broker connection probe |
| Replicas | exactly 1 (singleton) — replicas: 1, strategy: Recreate |
A beat replica > 1 leads to duplicate task emissions; the
Recreate strategy guarantees the old pod is down before the new one
starts.
Deployment surfaces
| Surface | Where |
|---|---|
| Compose | beat is folded into the worker container in compose (single-replica entrypoint switch) |
| Kustomize | deployments/kubernetes/base/alphaswarm-worker/beat-deployment.yaml |
| AQP CR | folded into AQPMonolith (spec.beat.enabled) |
Schedule highlights
- Every minute: factor staleness probe, kill-switch heartbeat, status-page sync.
- Every 5 minutes: predictor refresh (when models flagged
online: true), Iceberg orphan scan. - Hourly: ledger compaction, audit-event aggregation, alphaswarm-index curator nudge (for diff detection).
- Daily: OPA bundle refresh, terraform plan-drift check.
The full schedule lives in
alphaswarm/tasks/celery_app.py.
Operations
- Single-instance:
replicas: 1is enforced by the kustomize base; the AQPMonolith CR refuses to render a beat block withreplicas != 1. - Persistence: beat schedule lives at
/tmp/celerybeat-scheduleinside the pod (ephemeral); the schedule itself is code-defined so loss is recoverable. - Audit: beat-emitted tasks tag their
WorkloadRunrows withstarted_by_user_id = "system:beat"so audit queries can split human-driven from scheduled work.
See also
alphaswarm-worker.md— what consumes beat's output.tasks-api— task progress contract.