mirror of
https://github.com/orangecoding/fredy.git
synced 2026-06-16 12:31:07 +00:00
fixing test runner
This commit is contained in:
1
index.js
1
index.js
@@ -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;
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user