Celery worker that asynchronously loads static GTFS feeds into the database
- Python 96.2%
- Dockerfile 2.8%
- Makefile 1%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| .forgejo/workflows | ||
| src/schedule_foamer | ||
| tests | ||
| .env | ||
| .env.example | ||
| .gitignore | ||
| .gitleaks.toml | ||
| .pre-commit-config.yaml | ||
| CLAUDE.md | ||
| Dockerfile | ||
| LICENSE.txt | ||
| Makefile | ||
| pyproject.toml | ||
| README.md | ||
| uv.lock | ||
schedule-foamer
Celery worker that downloads GTFS static feeds, parses them, and writes to PostgreSQL tables defined in railroad-club.
Quick start
cp .env.example .env
# Edit .env with your DATABASE_URL and Redis URLs
uv sync
uv run pre-commit install # install git hooks (required once per clone)
uv run celery -A schedule_foamer.celery_app worker -l info
uv run celery -A schedule_foamer.celery_app beat -l info # periodic scheduling, separate process
Development commands
# Install git hooks (required once per clone)
uv run pre-commit install
uv run ruff check src/ # lint
uv run ruff check --fix src/ # lint + autofix
Docker
Built and run as part of music-student's docker-compose:
cd ../music-student
docker compose up --build
Tasks
| Task | Description |
|---|---|
schedule_foamer.tasks.load_feed |
Download and parse a single GTFS feed by ID |
schedule_foamer.tasks.ensure_all_feeds_scheduled |
Enqueue load_feed for feeds never loaded, failed, stuck, or (url feeds only) last loaded over 24h ago (runs every minute) |