From f31215540e8334daf16c185cf4577e5c81ce1d66 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Sun, 25 May 2025 19:56:26 +0200 Subject: [PATCH] auto-git: [change] main.js --- main.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.js b/main.js index 6a92206..b432499 100644 --- a/main.js +++ b/main.js @@ -150,16 +150,16 @@ async function ensureOllamaRunning() { //temporary hack console.error('[AutoGit] ollama serve konnte nicht gestartet werden:', e.message); throw e; } - // Warte bis zu 10x 500ms (max. 5 Sekunden), ob Port aufgeht - for (let i = 0; i < 20; i++) { - await new Promise(res => setTimeout(res, 500)); + // Warte bis zu 2x 5000mx (max. 10 Sekunden), ob Port aufgeht + for (let i = 0; i < 2; i++) { + await new Promise(res => setTimeout(res, 5000)); try { await pingOllama(); console.log('[AutoGit] Ollama läuft jetzt!'); return true; } catch (_) {/*noch nicht da*/} } - throw new Error('[AutoGit] ollama serve konnte nach 5 Sekunden nicht erreicht werden!'); + throw new Error('[AutoGit] ollama serve konnte nach 10 Sekunden nicht erreicht werden!'); } }