refactor: load environment variables from .env file and update openRouter configuration
This commit is contained in:
parent
82abe0bcb3
commit
1ec273a72b
1 changed files with 1 additions and 6 deletions
|
|
@ -77,7 +77,7 @@ async function runSignalWorker(archiveDb, intelligenceDb, config) {
|
||||||
const next = getNextCheckpoint.get();
|
const next = getNextCheckpoint.get();
|
||||||
|
|
||||||
if (!next) {
|
if (!next) {
|
||||||
await sleep(loopDelay);
|
await sleep(5000);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -85,7 +85,6 @@ async function runSignalWorker(archiveDb, intelligenceDb, config) {
|
||||||
const company = getCompanyById.get(company_id);
|
const company = getCompanyById.get(company_id);
|
||||||
|
|
||||||
if (!company) {
|
if (!company) {
|
||||||
await sleep(loopDelay);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -100,13 +99,11 @@ async function runSignalWorker(archiveDb, intelligenceDb, config) {
|
||||||
result = await callLlm(llmConfig, prompt);
|
result = await callLlm(llmConfig, prompt);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(`[signal] LLM error for ${company.name} @ ${checkpoint_date}:`, err.message);
|
console.error(`[signal] LLM error for ${company.name} @ ${checkpoint_date}:`, err.message);
|
||||||
await sleep(loopDelay);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!result) {
|
if (!result) {
|
||||||
console.log(`[signal] ${company.name} @ ${checkpoint_date} — LLM returned null, skipping`);
|
console.log(`[signal] ${company.name} @ ${checkpoint_date} — LLM returned null, skipping`);
|
||||||
await sleep(loopDelay);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -135,8 +132,6 @@ async function runSignalWorker(archiveDb, intelligenceDb, config) {
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error("[signal] cycle error:", err.message);
|
console.error("[signal] cycle error:", err.message);
|
||||||
}
|
}
|
||||||
|
|
||||||
await sleep(loopDelay);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue