From c60aeb4bb9e4381182ed0c30793ea6612ceaa283 Mon Sep 17 00:00:00 2001 From: schneefux Date: Sat, 1 Jul 2017 14:07:11 +0200 Subject: specify global_point table by env var --- crunch_global.sql | 2 +- worker.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/crunch_global.sql b/crunch_global.sql index f79b9b4..6fbf212 100644 --- a/crunch_global.sql +++ b/crunch_global.sql @@ -1,4 +1,4 @@ -insert low_priority into global_point +insert low_priority into :crunch_table select null, now(), diff --git a/worker.js b/worker.js index ae01dc5..d84544c 100644 --- a/worker.js +++ b/worker.js @@ -20,6 +20,7 @@ const amqp = require("amqplib"), const RABBITMQ_URI = process.env.RABBITMQ_URI, DATABASE_URI = process.env.DATABASE_URI, + CRUNCH_TABLE = process.env.CRUNCH_TABLE || "global_point", QUEUE = process.env.QUEUE || "crunch", LOGGLY_TOKEN = process.env.LOGGLY_TOKEN, // size of connection pool @@ -125,6 +126,7 @@ if (LOGGLY_TOKEN) replacements: { build_regex_start: '^([[:digit:]]+;[[:digit:]]+,)*(', build_regex_end: ')+(,[[:digit:]]+;[[:digit:]]+)*$', + crunch_table: CRUNCH_TABLE, participant_api_ids: api_ids_global }, type: seq.QueryTypes.UPSERT -- cgit v1.3.1