Wrap lightning stats importer into try/catch
This commit is contained in:
parent
46fbd6aa49
commit
a512884b65
@ -15,6 +15,7 @@ class LightningStatsImporter {
|
|||||||
topologiesFolder = config.LIGHTNING.TOPOLOGY_FOLDER;
|
topologiesFolder = config.LIGHTNING.TOPOLOGY_FOLDER;
|
||||||
|
|
||||||
async $run(): Promise<void> {
|
async $run(): Promise<void> {
|
||||||
|
try {
|
||||||
const [channels]: any[] = await DB.query('SELECT short_id from channels;');
|
const [channels]: any[] = await DB.query('SELECT short_id from channels;');
|
||||||
logger.info(`Caching funding txs for currently existing channels`, logger.tags.ln);
|
logger.info(`Caching funding txs for currently existing channels`, logger.tags.ln);
|
||||||
await fundingTxFetcher.$fetchChannelsFundingTxs(channels.map(channel => channel.short_id));
|
await fundingTxFetcher.$fetchChannelsFundingTxs(channels.map(channel => channel.short_id));
|
||||||
@ -25,6 +26,9 @@ class LightningStatsImporter {
|
|||||||
|
|
||||||
await this.$importHistoricalLightningStats();
|
await this.$importHistoricalLightningStats();
|
||||||
await this.$cleanupIncorrectSnapshot();
|
await this.$cleanupIncorrectSnapshot();
|
||||||
|
} catch (e) {
|
||||||
|
logger.err(`Exception in LightningStatsImporter::$run(). ${e}`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user