fixing test runner

This commit is contained in:
orangecoding
2025-10-29 10:35:07 +01:00
parent 79a8420dfb
commit e3c62d4696
2 changed files with 7 additions and 4 deletions

View File

@@ -38,6 +38,7 @@ await runMigrations();
const providers = await getProviders();
similarityCache.initSimilarityCache();
similarityCache.startSimilarityCacheReloader();
//assuming interval is always in minutes
const INTERVAL = config.interval * 60 * 1000;

View File

@@ -29,10 +29,12 @@ const reloadCycle = 60 * 60 * 1000; // every hour, refresh
*/
let cache = new Set();
// Periodically refresh the cache from storage
setInterval(() => {
initSimilarityCache();
}, reloadCycle);
export const startSimilarityCacheReloader = () => {
// Periodically refresh the cache from storage
setInterval(() => {
initSimilarityCache();
}, reloadCycle);
};
/**
* Initialize or refresh the similarity cache from persistent storage.