fix: worker waits for schema before claiming; npm ci for reproducible builds

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jonathan
2026-07-10 17:32:20 +02:00
parent 52a0999f9b
commit 7532e20d1e
4 changed files with 46 additions and 3 deletions
+11
View File
@@ -0,0 +1,11 @@
from lyra_worker.db import wait_for_db
def test_wait_for_db_returns_usable_connection_when_schema_ready(conn):
# `conn` fixture guarantees the DB is up and the schema is migrated.
result = wait_for_db(timeout=5)
try:
with result.cursor() as cur:
cur.execute('SELECT 1 FROM "Job" LIMIT 0')
finally:
result.close()