From c907f985a63162f9cf38aa55b4d7806139d203e7 Mon Sep 17 00:00:00 2001 From: schneefux Date: Sat, 22 Apr 2017 09:47:46 +0200 Subject: nerf items --- worker.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/worker.js b/worker.js index db53864..e4de8a7 100644 --- a/worker.js +++ b/worker.js @@ -85,7 +85,7 @@ function flatten(obj) { while (true) { try { seq = new Seq(DATABASE_URI, { - logging: false, + //logging: false, max: 10 }); rabbit = await amqp.connect(RABBITMQ_URI, { heartbeat: 120 }); @@ -321,9 +321,9 @@ function flatten(obj) { let itms = []; itms = itms.concat(item_use(participant.attributes.stats.items, "final")); - itms = itms.concat(item_use(item_arr_from_obj(participant.attributes.stats.itemGrants), "grant")); - itms = itms.concat(item_use(item_arr_from_obj(participant.attributes.stats.itemUses), "use")); - itms = itms.concat(item_use(item_arr_from_obj(participant.attributes.stats.itemSells), "sell")); + //itms = itms.concat(item_use(item_arr_from_obj(participant.attributes.stats.itemGrants), "grant")); + //itms = itms.concat(item_use(item_arr_from_obj(participant.attributes.stats.itemUses), "use")); + //itms = itms.concat(item_use(item_arr_from_obj(participant.attributes.stats.itemSells), "sell")); // for debugging: /* @@ -391,7 +391,7 @@ function flatten(obj) { // upsert whole batch in parallel logger.info("inserting batch into db"); await seq.transaction({ autocommit: false }, async (transaction) => { - await Promise.all([ + return Promise.all([ Promise.map(chunks(match_records), async (m_r) => model.Match.bulkCreate(m_r, { ignoreDuplicates: true, // should not happen -- cgit v1.3.1