From 7227be3e6ec88f0b862f2ffc0fb1d55627bd7bd9 Mon Sep 17 00:00:00 2001 From: meriadec Date: Fri, 7 Sep 2018 13:52:55 +0200 Subject: [PATCH] Drastically increment sync timeouts to address long sync issues --- src/config/constants.js | 2 +- src/helpers/libcore.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config/constants.js b/src/config/constants.js index cbe5b29e..06ad1b7d 100644 --- a/src/config/constants.js +++ b/src/config/constants.js @@ -45,7 +45,7 @@ export const SYNC_ALL_INTERVAL = 120 * 1000 export const SYNC_BOOT_DELAY = 2 * 1000 export const SYNC_PENDING_INTERVAL = 10 * 1000 export const SYNC_MAX_CONCURRENT = intFromEnv('LEDGER_SYNC_MAX_CONCURRENT', 1) -export const SYNC_TIMEOUT = intFromEnv('SYNC_TIMEOUT', 60 * 1000) +export const SYNC_TIMEOUT = intFromEnv('SYNC_TIMEOUT', 5 * 60 * 1000) // Endpoints... diff --git a/src/helpers/libcore.js b/src/helpers/libcore.js index e044ff71..240eba5f 100644 --- a/src/helpers/libcore.js +++ b/src/helpers/libcore.js @@ -555,7 +555,7 @@ export async function syncAccount({ unsub() const query = njsAccount.queryOperations() - const ops = await timeoutTagged('ops', 30000, query.complete().execute()) + const ops = await timeoutTagged('ops', 5 * 60 * 1000, query.complete().execute()) const njsBalance = await timeoutTagged('getBalance', 10000, njsAccount.getBalance()) const syncedRawAccount = await buildAccountRaw({