#!/usr/bin/env bash
set -euo pipefail

ROOT_DIR="$(cd "$(dirname "$0")/.." && pwd)"
cd "$ROOT_DIR"

source .venv/bin/activate

SCHEDULE_DIR="$ROOT_DIR/.codex-run"
mkdir -p "$SCHEDULE_DIR"

celery -A fastapi_admin.celery_app:celery_app beat \
  --loglevel=INFO \
  --pidfile= \
  --schedule "$SCHEDULE_DIR/celerybeat-schedule"
