summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2017-08-23 20:43:04 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2017-08-23 20:43:04 +0200
commit4005fab041e6b72aface2ef4a964d3f2b1db3d0d (patch)
tree79f3d95a116d4249acc93ff45783207a26274ff6
parent2c18a88ceedb0a55f51cbb77c22ea54a1ba3f6d7 (diff)
downloadshrinker-4005fab041e6b72aface2ef4a964d3f2b1db3d0d.tar.gz
shrinker-4005fab041e6b72aface2ef4a964d3f2b1db3d0d.zip
fix process exit on missing seeds
-rw-r--r--worker.js4
1 files changed, 2 insertions, 2 deletions
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