Log correct maxmind mysql updates - fix stats import processed files counter

This commit is contained in:
nymkappa
2022-08-24 15:39:52 +02:00
parent 12c188266a
commit faec398cf0
2 changed files with 40 additions and 8 deletions

View File

@@ -360,9 +360,11 @@ class LightningStatsImporter {
fileContent = await fsPromises.readFile(`${this.topologiesFolder}/${filename}`, 'utf8');
} catch (e: any) {
if (e.errno == -1) { // EISDIR - Ignore directorie
totalProcessed++;
continue;
}
logger.err(`Unable to open ${this.topologiesFolder}/${filename}`);
totalProcessed++;
continue;
}
@@ -372,6 +374,7 @@ class LightningStatsImporter {
graph = await this.cleanupTopology(graph);
} catch (e) {
logger.debug(`Invalid topology file ${this.topologiesFolder}/${filename}, cannot parse the content. Reason: ${e instanceof Error ? e.message : e}`);
totalProcessed++;
continue;
}