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:
@@ -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()
|
||||
Reference in New Issue
Block a user