Browse Source

Merge pull request #1497 from meriadec/update-sync-timeout

Drastically increment sync timeouts to address long sync issues
master
Gaëtan Renaudeau 6 years ago
committed by GitHub
parent
commit
50692b32c2
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/config/constants.js
  2. 2
      src/helpers/libcore.js

2
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...

2
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({

Loading…
Cancel
Save