diff --git a/svc/backupscanner.js b/svc/backupscanner.js index 097259be6..fb8648814 100644 --- a/svc/backupscanner.js +++ b/svc/backupscanner.js @@ -37,6 +37,7 @@ function processMatch(matchId, cb) { return cb(); } const match = body.result; + try { await insertMatchPromise(match, { type: 'api', origin: 'scanner', @@ -46,6 +47,9 @@ function processMatch(matchId, cb) { // If GetMatchHistoryBySequenceNum is out for a long time, this might be a problem redis.setex(`scanner_insert:${match.match_id}`, 3600 * 24 * 30, 1); cb(); + } catch(e) { + cb(e); + } } ); }); diff --git a/test/test.js b/test/test.js index 923d0f026..d814bae71 100644 --- a/test/test.js +++ b/test/test.js @@ -324,7 +324,7 @@ describe('replay parse', function () { throw e; } console.log('waiting for insert settle'); - await new Promise((resolve) => setTimeout(resolve, 10000)); + await new Promise((resolve) => setTimeout(resolve, 20000)); console.log('checking parsed match'); // ensure parse data got inserted const match = await buildMatch(tests[key].match_id);