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:
1 parent
7e60343ed5
commit
6bc9fa0e8d
4 files changed
+27
-9
No files matched your search
@@ -33,6 +33,9 @@ class Settings:
|
||||
retry_minutes: int = field(
|
||||
default_factory=lambda: int(os.environ.get("RETRY_MINUTES", "15"))
|
||||
)
|
||||
slow_retry_minutes: int = field(
|
||||
default_factory=lambda: int(os.environ.get("SLOW_RETRY_MINUTES", "60"))
|
||||
)
|
||||
wikipedia_lang: str = field(
|
||||
default_factory=lambda: os.environ.get("WIKIPEDIA_LANG", "en")
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user