summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--worker.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/worker.js b/worker.js
index a3054e6..07878fe 100644
--- a/worker.js
+++ b/worker.js
@@ -284,6 +284,7 @@ function snakeCaseKeys(obj) {
// upsert whole batch in parallel
await seq.transaction({ autocommit: false }, async (transaction) => {
console.log("inserting batch into db");
+ await seq.query("SET unique_checks=0");
await Promise.all([
model.Match.bulkCreate(match_records, {
include: [ model.Roster, model.Asset ],
@@ -321,6 +322,7 @@ function snakeCaseKeys(obj) {
transaction: transaction
})
]);
+ await seq.query("SET unique_checks=1");
// update last_match_created_date and skill tier for players
// that were explicitely pushed into processor