fix: isolate scheduler validation in bootstrap
This commit is contained in:
@@ -35,18 +35,13 @@ docker compose --env-file .env.production.example -f compose.production.yaml -f
|
||||
}
|
||||
echo "Caddy configuration valid ✓"
|
||||
|
||||
# A10: Check scheduler can start without external network
|
||||
# A10: Check scheduler module can load without running real sources
|
||||
echo "Validating community scheduler..."
|
||||
$compose up --build -d --wait community-scheduler
|
||||
# Scheduler runs in a loop, check it's healthy by verifying the process is running
|
||||
$compose exec -T community-scheduler python -c "import app.community_scheduler; print('scheduler module loads OK')" >/dev/null 2>&1 || {
|
||||
$compose run --rm --no-deps community-scheduler python -c "import app.community_scheduler; print('scheduler module loads OK')" >/dev/null 2>&1 || {
|
||||
echo "ERROR: Community scheduler failed to start" >&2
|
||||
$compose logs --no-color community-scheduler >&2
|
||||
exit 1
|
||||
}
|
||||
echo "Community scheduler valid ✓"
|
||||
# Stop scheduler to free resources
|
||||
$compose stop community-scheduler
|
||||
|
||||
# A10: Extract Alembic revision ID programmatically, handle multiple heads
|
||||
ALEMBIC_HEADS_OUTPUT=$($compose exec -T api alembic heads 2>/dev/null || true)
|
||||
|
||||
Reference in New Issue
Block a user