From 9567fcbd4d41f603fab53864008add884bd315de Mon Sep 17 00:00:00 2001 From: schneefux Date: Tue, 4 Apr 2017 21:05:09 +0200 Subject: await transaction --- worker.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'worker.js') diff --git a/worker.js b/worker.js index 4fcb0bf..1efcba7 100644 --- a/worker.js +++ b/worker.js @@ -192,8 +192,8 @@ var RABBITMQ_URI = process.env.RABBITMQ_URI || "amqp://localhost", // load records into db try { console.log("inserting batch into db"); - await seq.transaction({ autocommit: false }, (transaction) => { - return Promise.all([ + await seq.transaction({ autocommit: false }, async (transaction) => { + await Promise.all([ model.ParticipantExt.bulkCreate(participant_ext_records, { updateOnDuplicate: [], // all transaction: transaction -- cgit v1.3.1