From a1cc7a1c4dd51a93f7853d72e19fed26bcd610b4 Mon Sep 17 00:00:00 2001 From: Tom Beynon Date: Sun, 25 Jun 2023 00:58:51 +0100 Subject: [PATCH] Exclude Chain Registry template directory --- chainWorker.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chainWorker.js b/chainWorker.js index 136dc97..b128c87 100644 --- a/chainWorker.js +++ b/chainWorker.js @@ -51,8 +51,8 @@ async function queueChainCheck(client, registry, monitor) { (async () => { const client = await redisClient(); - const chainRepo = Repository(client, chainUrl, chainBranch, { path: chainPath, require: 'chain.json' }) - const validatorRepo = Repository(client, validatorUrl, validatorBranch, { exclude: [], require: 'chains.json', storeMeta: async (name, allData) => { + const chainRepo = Repository(client, chainUrl, chainBranch, { path: chainPath, exclude: ['_template'], require: 'chain.json' }) + const validatorRepo = Repository(client, validatorUrl, validatorBranch, { require: 'chains.json', storeMeta: async (name, allData) => { await client.json.set([name, 'addresses'].join(':'), '$', allData.reduce((sum, validator) => { for(const chain of validator.chains.chains){ sum[chain.address] = validator.path @@ -80,4 +80,4 @@ async function queueChainCheck(client, registry, monitor) { if (chainRefreshSeconds > 0) { queueChainCheck(client, chainRegistry, chainMonitor) } -})(); \ No newline at end of file +})();