From 4005fab041e6b72aface2ef4a964d3f2b1db3d0d Mon Sep 17 00:00:00 2001 From: schneefux Date: Wed, 23 Aug 2017 20:43:04 +0200 Subject: fix process exit on missing seeds --- worker.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'worker.js') diff --git a/worker.js b/worker.js index bcbb66b..a4718dd 100644 --- a/worker.js +++ b/worker.js @@ -17,7 +17,7 @@ const RABBITMQ_URI = process.env.RABBITMQ_URI, QUEUE = process.env.QUEUE || "shrink", LOGGLY_TOKEN = process.env.LOGGLY_TOKEN, // matches + players, 5 players with 50 matches as default - BATCHSIZE = parseInt(process.env.BATCHSIZE) || 5 * (50 + 1), + BATCHSIZE = parseInt(process.env.BATCHSIZE) || 1, //|| 5 * (50 + 1), // maximum number of elements to be inserted in one statement CHUNKSIZE = parseInt(process.env.CHUNKSIZE) || 100, MAXCONNS = parseInt(process.env.MAXCONNS) || 10, // how many concurrent actions @@ -107,7 +107,7 @@ amqp.connect(RABBITMQ_URI).then(async (rabbit) => { if (item_db_map.size == 0 || hero_db_map.size == 0) { logger.error("mapping tables are not seeded!!! quitting"); - process.exit(); + global.process.exit(); } // buffers that will be filled until BATCHSIZE is reached -- cgit v1.3.1