From a975936d3c606922bdd896944269a024ce6bd3eb Mon Sep 17 00:00:00 2001 From: nymkappa <1612910616@pm.me> Date: Wed, 28 Dec 2022 12:13:41 +0100 Subject: [PATCH] Don't try to import LN historical stats if no topology folder is set --- backend/src/tasks/lightning/sync-tasks/stats-importer.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backend/src/tasks/lightning/sync-tasks/stats-importer.ts b/backend/src/tasks/lightning/sync-tasks/stats-importer.ts index 6d6c9e4d3..c7e0d215f 100644 --- a/backend/src/tasks/lightning/sync-tasks/stats-importer.ts +++ b/backend/src/tasks/lightning/sync-tasks/stats-importer.ts @@ -310,6 +310,11 @@ class LightningStatsImporter { * Import topology files LN historical data into the database */ async $importHistoricalLightningStats(): Promise { + if (!config.LIGHTNING.TOPOLOGY_FOLDER) { + logger.info(`Lightning topology folder is not set. Not importing historical LN stats`); + return; + } + logger.debug('Run the historical importer'); try { let fileList: string[] = [];