Skip to main content

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

FieldValue
Service idalphaswarm-beat
Rolescheduler
Packagealphaswarm/ (schedule under alphaswarm/tasks/celery_app.py)
Image (key)beat
Built fromalphaswarm_platform/Dockerfile (image key beat → target worker; beat shares the slim orchestration image)

Wire

FieldValue
Protocolnone
HealthCelery broker connection probe
Replicasexactly 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

SurfaceWhere
Composebeat is folded into the worker container in compose (single-replica entrypoint switch)
Kustomizedeployments/kubernetes/base/alphaswarm-worker/beat-deployment.yaml
AQP CRfolded 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: 1 is enforced by the kustomize base; the AQPMonolith CR refuses to render a beat block with replicas != 1.
  • Persistence: beat schedule lives at /tmp/celerybeat-schedule inside the pod (ephemeral); the schedule itself is code-defined so loss is recoverable.
  • Audit: beat-emitted tasks tag their WorkloadRun rows with started_by_user_id = "system:beat" so audit queries can split human-driven from scheduled work.

See also