diff options
Diffstat (limited to 'worker.js')
| -rw-r--r-- | worker.js | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -55,7 +55,7 @@ var RABBITMQ_URI = process.env.RABBITMQ_URI, // fill queue until batchsize or idle if (timer === undefined) - timer = setTimeout(process, IDLE_TIMEOUT) + timer = setTimeout(process, IDLE_TIMEOUT); if (queue.length == BATCHSIZE) await process(); }, { noAck: false }); @@ -212,8 +212,8 @@ var RABBITMQ_URI = process.env.RABBITMQ_URI, try { console.log("inserting batch into db"); // upsert whole batch in parallel - await seq.transaction({ autocommit: false }, (transaction) => { - return Promise.all([ + await seq.transaction({ autocommit: false }, async (transaction) => { + await Promise.all([ model.Match.bulkCreate(match_records, { include: [ model.Roster, model.Asset ], updateOnDuplicate: [], // all |
