feat(pg-queue): LISTEN ix_jobs_new + 10s fallback poll #23
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/pg-queue-adapter"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
PgQueueListener holds a dedicated asyncpg connection (outside SQLAlchemy pool) for LISTEN ix_jobs_new; exposes wait_for_work(timeout) that resolves on either a NOTIFY or the timeout. App lifespan spawns the listener alongside the worker.
Helper asyncpg_dsn_from_sqlalchemy_url strips the +asyncpg driver segment and percent-decodes the password so the same IX_POSTGRES_URL works for both libs.
2 new integration tests: NOTIFY path picks up within 2s despite a 60s poll; missed-NOTIFY path still picks up within 5s via fallback poll. Total: 209 unit + 33 integration, all green. Forgejo Actions trigger is flaky; local verification is the gate.