mirror of
https://github.com/stronk-dev/OrchestratorTracker.git
synced 2025-07-05 02:45:10 +02:00
Make sure that node-persist write do not crash the program
This commit is contained in:
parent
8c804e7de7
commit
2547a026e7
@ -120,14 +120,24 @@ async function processQueue() {
|
||||
}
|
||||
} else {
|
||||
if (staleENSCache) {
|
||||
try {
|
||||
console.log("Writing ENS cache to disk");
|
||||
await writeToStorage("ensDomainCache", ensDomainCache);
|
||||
staleENSCache = false;
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
console.log("Error writing to storage...");
|
||||
}
|
||||
}
|
||||
if (staleOrchCache) {
|
||||
try {
|
||||
console.log("Writing Orchestrator cache to disk");
|
||||
await writeToStorage("orchCache", orchCache);
|
||||
staleOrchCache = false;
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
console.log("Error writing to storage...");
|
||||
}
|
||||
}
|
||||
await sleep(1000);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user