Add fetch timeout and unify logging on stdout

- Abort the Anthropic fire request after FIRE_TIMEOUT_MS instead of
  letting it hang indefinitely with no outcome logged.
- Log info and error levels both to stdout (JSON has a level field
  already) so a single log stream/tail shows the full picture instead
  of splitting across stdout/stderr, which was hiding forward failures
  from anyone only watching one of the two.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-24 03:08:08 +02:00
parent 6d37579f52
commit 1886e512eb
2 changed files with 16 additions and 3 deletions

View File

@@ -17,3 +17,7 @@ ROUTINE_TOKEN=sk-ant-oat01-changeme
# TTL en milisegundos para el dedup en memoria de entregas de Gitea (X-Gitea-Delivery)
DEDUP_TTL_MS=300000
# Timeout en milisegundos para la llamada a la API de Anthropic (evita que se
# quede colgada indefinidamente si no hay salida a internet)
FIRE_TIMEOUT_MS=10000