From 693ec4a5d41b76debf8f5ad48d20cfc7d991467f Mon Sep 17 00:00:00 2001 From: Viktor Barzin Date: Sat, 18 Apr 2026 22:36:05 +0000 Subject: [PATCH] extractor: wait up to 15min for claude-agent-service to free lock MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Real UK payslip extractions routinely take 5-10min end-to-end (Haiku processing 100-300KB base64'd PDFs). With 10 retries × 5s = 50s we'd abort while another extraction was still in-flight. Bump to 90 retries × 10s = 900s wait — enough to cover the server-side timeout_seconds=600 plus some slack. Co-Authored-By: Claude Opus 4.7 (1M context) --- payslip_ingest/extractor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/payslip_ingest/extractor.py b/payslip_ingest/extractor.py index 1ced592..3c36d32 100644 --- a/payslip_ingest/extractor.py +++ b/payslip_ingest/extractor.py @@ -41,8 +41,8 @@ EXTRACTION_PROMPT = ( POLL_INTERVAL_SECONDS = 3 MAX_POLL_SECONDS = 600 -BUSY_RETRY_DELAY_SECONDS = 5 -MAX_BUSY_RETRIES = 10 +BUSY_RETRY_DELAY_SECONDS = 10 +MAX_BUSY_RETRIES = 90 DEFAULT_MAX_BUDGET_USD = 1.0 DEFAULT_TIMEOUT_SECONDS = 600