mirror of
https://github.com/mempool/mempool.git
synced 2025-01-18 05:12:35 +01:00
Remove filename check for fs.watch
This commit is contained in:
parent
40f7eaf7ba
commit
40afa7a420
@ -28,15 +28,13 @@ class Bisq {
|
||||
|
||||
let fsWait: NodeJS.Timeout | null = null;
|
||||
fs.watch(config.BSQ_BLOCKS_DATA_PATH, (event: string, filename: string) => {
|
||||
if (filename) {
|
||||
if (fsWait) {
|
||||
clearTimeout(fsWait);
|
||||
}
|
||||
fsWait = setTimeout(() => {
|
||||
console.log(`${filename} file change detected.`);
|
||||
this.loadBisqDumpFile();
|
||||
}, 1000);
|
||||
if (fsWait) {
|
||||
clearTimeout(fsWait);
|
||||
}
|
||||
fsWait = setTimeout(() => {
|
||||
console.log(`${filename} file change detected.`);
|
||||
this.loadBisqDumpFile();
|
||||
}, 1000);
|
||||
});
|
||||
|
||||
setInterval(this.updatePrice.bind(this), 1000 * 60 * 60);
|
||||
|
Loading…
Reference in New Issue
Block a user