fix(precedent-library): queue listing must include internal_committee too
All checks were successful
Build & Deploy / build-and-deploy (push) Successful in 1m36s

Earlier commit afcc481 opened request_metadata_extraction and
request_halacha_extraction to all source kinds — but
list_pending_extraction_requests still hard-filtered to external_upload.

Result: stamping a queue request on an internal_committee row succeeded
silently, but the worker (and the queue badge) never saw it. Even with
the auto-wakeup added in c7132ba the CEO would wake, find 0 pending
items, and exit.

Drop the legacy filter so the queue listing matches the writer side.

Coolify deploy required for the FastAPI container to pick this up.
This commit is contained in:
2026-05-07 06:51:19 +00:00
parent c7132ba0d2
commit 36b78ea404

View File

@@ -2510,12 +2510,15 @@ async def list_pending_extraction_requests(
else "halacha_extraction_requested_at"
)
pool = await get_pool()
# Drop the legacy ``source_kind = 'external_upload'`` filter — without it
# internal_committee rows could be stamped (we opened that gate in
# request_metadata_extraction / request_halacha_extraction) but stayed
# invisible to the worker forever.
rows = await pool.fetch(
f"""SELECT id, case_number, case_name, court, date,
practice_area, is_binding, {col} AS requested_at
FROM case_law
WHERE {col} IS NOT NULL
AND source_kind = 'external_upload'
ORDER BY {col} ASC
LIMIT $1""",
limit,