Skip to content

Commit 6f12879

Browse files
committed
test update
1 parent 0962c5f commit 6f12879

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

app/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const morgan = require('morgan'); // Logging
1010
const jwt = require('jsonwebtoken');
1111
const fileUpload = require('express-fileupload'); // File upload support
1212
const {setupBullBoard} = require('./bull-board');
13-
const {getReadyQueues} = require('./queue'); // exports { emailQueue, ... }
13+
const {setupQueues, getReadyQueues} = require('./queue'); // exports { emailQueue, ... }
1414

1515
const conf = require('./config');
1616
const sequelize = require('./models');
@@ -147,6 +147,7 @@ const listen = async (port = null) => {
147147
}
148148

149149
// bull-mq setup
150+
setupQueues();
150151
const queues = Object.values(getReadyQueues());
151152
setupBullBoard({app, queues});
152153

app/queue.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,11 +207,13 @@ const setupQueues = () => {
207207
setUpGraphkbNewUserWorker(graphkbNewUserProcessor);
208208
};
209209

210-
setupQueues();
210+
const getReadyQueues = () => {
211+
return ({emailQueue, reportQueue, graphkbNewUserQueue});
212+
};
211213

212214
module.exports = {
213215
setupQueues,
214-
getReadyQueues: () => {return {emailQueue, reportQueue, graphkbNewUserQueue};},
216+
getReadyQueues,
215217
addJobToEmailQueue,
216218
addJobToReportQueue,
217219
addJobToGraphkbNewUserQueue,

0 commit comments

Comments
 (0)