diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-07-26 21:26:07 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-07-26 21:26:07 +0200 |
| commit | 9e3c593ca9e37e81ea40616ef50ffcb3fcb4810f (patch) | |
| tree | 556f755de95c95e4c117402e954544b1714ba96d /worker.js | |
| parent | 7b851abb845b43ec1ed72422872e130c14624aa0 (diff) | |
| download | cruncher-9e3c593ca9e37e81ea40616ef50ffcb3fcb4810f.tar.gz cruncher-9e3c593ca9e37e81ea40616ef50ffcb3fcb4810f.zip | |
go into slowmode before processing
Diffstat (limited to 'worker.js')
| -rw-r--r-- | worker.js | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -93,6 +93,11 @@ amqp.connect(RABBITMQ_URI).then(async (rabbit) => { participants.clear(); + if (SLOWMODE > 0) { + logger.info("slowmode active, sleeping…", { wait: SLOWMODE }); + await sleep(SLOWMODE * 1000); + } + try { await crunch(api_ids); } catch (err) { @@ -113,11 +118,6 @@ amqp.connect(RABBITMQ_URI).then(async (rabbit) => { // TODO notify for player too // TODO fix these await ch.publish("amq.topic", "global", new Buffer("points_update")); - - if (SLOWMODE > 0) { - logger.info("slowmode active, sleeping…", { wait: SLOWMODE }); - await sleep(SLOWMODE * 1000); - } } // execute the script |
