Repository navigation
Run airport/airline imports on startup and weekly (AVI-43) - #18
Merged
cfarrell987 merged 1 commit intoAug 25, 2026
Merged
cfarrell987 merged 1 commit into
cfarrell987 merged 1 commit into
Conversation
Web now imports airports and airlines on every container start (both commands are idempotent, so this only picks up new/changed rows), and a new ofelia sidecar re-runs them on a weekly schedule via docker exec against the web container.
cfarrell987
force-pushed
the
feature/avi-43-airport-and-airlines-not-populating-on-startup
branch
from
August 25, 2026 18:45
1176332 to
b35984d
Compare
cfarrell987
deleted the
feature/avi-43-airport-and-airlines-not-populating-on-startup
branch
August 25, 2026 18:46
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
import_airports --yesandimport_airlines --yeson every container startup (after migrate, before gunicorn). Both commands are already idempotent (skip existing, sync disabled/re-enabled), so this only ever adds new rows.schedulerservice (ofelia, docker-native cron) re-runs the same two commands weekly viadocker execagainst thewebcontainer, driven byofelia.job-exec.*labels onweb.Went with ofelia over Celery+Beat+Redis since there's no task-queue infra in the repo yet and this is just two weekly jobs — ofelia adds zero new Python dependencies, it's config-only.
Test plan
docker compose up -d --buildfrom clean volumes: confirmedweblogs show migrate → import_airports (3953 new) → import_airlines (1019 new) → gunicorn boot, in orderschedulercontainer logs show both jobs registered:import-airportsandimport-airlines, schedule@weeklyairports_airport(3953 rows) andairlines_airline(1019 rows) are populateddocker execagainst the runningwebcontainer (simulating what ofelia does) — confirmed idempotent re-run: 0 new rows, no errors