fix: increase Ollama health check timeout to prevent false offline status
All checks were successful
CD Pipeline / deploy (push) Successful in 1m18s
All checks were successful
CD Pipeline / deploy (push) Successful in 1m18s
This commit is contained in:
@@ -56,8 +56,8 @@ class OllamaService:
|
||||
return OllamaService._connection_cache['status']
|
||||
|
||||
try:
|
||||
# V-Opt: 縮短超時時間從 10 秒改為 3 秒
|
||||
response = requests.get(f"{self.host}/api/tags", timeout=3)
|
||||
# V-Opt: 增加超時時間避免 Ollama 負載高時誤判為離線
|
||||
response = requests.get(f"{self.host}/api/tags", timeout=10)
|
||||
if response.status_code == 200:
|
||||
data = response.json()
|
||||
self.available_models = [m['name'] for m in data.get('models', [])]
|
||||
|
||||
Reference in New Issue
Block a user