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();
|
const providers = await getProviders();
|
||||||
|
|
||||||
similarityCache.initSimilarityCache();
|
similarityCache.initSimilarityCache();
|
||||||
|
similarityCache.startSimilarityCacheReloader();
|
||||||
|
|
||||||
//assuming interval is always in minutes
|
//assuming interval is always in minutes
|
||||||
const INTERVAL = config.interval * 60 * 1000;
|
const INTERVAL = config.interval * 60 * 1000;
|
||||||
|
|||||||
@@ -29,10 +29,12 @@ const reloadCycle = 60 * 60 * 1000; // every hour, refresh
|
|||||||
*/
|
*/
|
||||||
let cache = new Set();
|
let cache = new Set();
|
||||||
|
|
||||||
// Periodically refresh the cache from storage
|
export const startSimilarityCacheReloader = () => {
|
||||||
setInterval(() => {
|
// Periodically refresh the cache from storage
|
||||||
initSimilarityCache();
|
setInterval(() => {
|
||||||
}, reloadCycle);
|
initSimilarityCache();
|
||||||
|
}, reloadCycle);
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize or refresh the similarity cache from persistent storage.
|
* Initialize or refresh the similarity cache from persistent storage.
|
||||||
|
|||||||
Reference in New Issue
Block a user