diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-08-23 20:43:04 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-08-23 20:43:04 +0200 |
| commit | 4005fab041e6b72aface2ef4a964d3f2b1db3d0d (patch) | |
| tree | 79f3d95a116d4249acc93ff45783207a26274ff6 | |
| parent | 2c18a88ceedb0a55f51cbb77c22ea54a1ba3f6d7 (diff) | |
| download | shrinker-4005fab041e6b72aface2ef4a964d3f2b1db3d0d.tar.gz shrinker-4005fab041e6b72aface2ef4a964d3f2b1db3d0d.zip | |
fix process exit on missing seeds
| -rw-r--r-- | worker.js | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |
