Resume retries after cooldown instead of giving up for the day

Previously 3 failed attempts at 06:00 (e.g. llamaswap model cold/starting)
permanently blocked generation until the next day. Now the retry loop
pauses SLOW_RETRY_MINUTES (default 60) after the burst budget is spent,
then resumes — one attempt per hour until jokes exist.
This commit is contained in:
2026-09-30 07:55:40 +00:00
parent 7e60343ed5
commit 6bc9fa0e8d
4 changed files with 27 additions and 9 deletions
+2 -1
View File
@@ -28,8 +28,9 @@ docker compose up -d --build
| `OPENAI_MODEL` | `gpt-4o-mini` | Model name |
| `OPENAI_API_KEY` | *(empty)* | Bearer token (optional for llamaswap) |
| `GENERATE_HOUR` / `GENERATE_MINUTE` | `6` / `0` | Daily generation time |
| `MAX_ATTEMPTS` | `3` | Retry budget per day |
| `MAX_ATTEMPTS` | `3` | Retry budget per burst |
| `RETRY_MINUTES` | `15` | Retry interval |
| `SLOW_RETRY_MINUTES` | `60` | Cooldown after budget exhausted, then retries resume |
| `WIKIPEDIA_LANG` | `en` | Wikipedia language for the feed |
| `DB_PATH` | `/data/jokes.db` | SQLite location (volume-mounted) |