summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crunch_global.sql2
-rw-r--r--worker.js2
2 files changed, 3 insertions, 1 deletions
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