fix(очередь): нулевой или отрицательный шаг keepalive не крутит цикл без пауз
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -115,3 +115,12 @@ def test_limit_comes_from_setting(monkeypatch):
|
||||
monkeypatch.setenv("AGENT_MAX_CONCURRENT", "abc")
|
||||
importlib.reload(claude_bridge)
|
||||
assert claude_bridge.MAX_CONCURRENT == 3 # мусор в настройке — прежний предел
|
||||
|
||||
|
||||
def test_zero_keepalive_setting_falls_back(monkeypatch):
|
||||
# Ноль или минус дали бы бешеный цикл keepalive без пауз (нашёл дипсик 28.10.2026).
|
||||
import claude_bridge
|
||||
for bad in ("0", "-5", "abc"):
|
||||
monkeypatch.setenv("AGENT_QUEUE_KEEPALIVE", bad)
|
||||
importlib.reload(claude_bridge)
|
||||
assert claude_bridge.QUEUE_KEEPALIVE == 20.0
|
||||
|
||||
Reference in New Issue
Block a user