Skip to content
This repository has been archived by the owner on May 5, 2024. It is now read-only.

Commit

Permalink
Merge pull request #90 from davidahouse/house/89/standardize-queue-na…
Browse files Browse the repository at this point in the history
…ming

♻️ Standardize on the queue naming
  • Loading branch information
davidahouse authored Nov 12, 2019
2 parents 6f7730d + 9053712 commit 6869a9f
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions bin/stampede-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ const conf = require("rc")("stampede", {
workerName: null,
stampedeConfigPath: null,
stampedeScriptPath: null,
taskQueue: "stampede-tasks",
responseQueue: "stampede-response",
taskQueue: "tasks",
responseQueue: "response",
workspaceRoot: null,
// Test mode. Set both of these to enable test mode
// where the worker will execute the task that is in the
Expand All @@ -45,7 +45,7 @@ const conf = require("rc")("stampede", {
taskDetailsLogFile: "worker.log",
logQueuePath: null,
// Heartbeat
heartbeatQueue: "stampede-heartbeat",
heartbeatQueue: "heartbeat",
heartbeatInterval: 15000
});

Expand Down Expand Up @@ -91,10 +91,13 @@ if (

if (conf.taskTestFile == null) {
const workerQueue = new Queue("stampede-" + conf.taskQueue, redisConfig);
const responseQueue = new Queue(conf.responseQueue, redisConfig);
const responseQueue = new Queue(
"stampede-" + conf.responseQueue,
redisConfig
);
const heartbeatQueue =
conf.heartbeatQueue != null
? new Queue(conf.heartbeatQueue, redisConfig)
? new Queue("stampede-" + conf.heartbeatQueue, redisConfig)
: null;

workerQueue.process(function(task) {
Expand Down

0 comments on commit 6869a9f

Please sign in to comment.