Skip to content

Commit 7e0c10a

Browse files
committed
Ensure that hyperflow.jobs queue is created
1 parent f37c6b9 commit 7e0c10a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

functions/amqpCommand.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ function connect() {
1515

1616
connection.then(function(conn) {
1717
console.log("[AMQP] Connected!");
18+
19+
return when(conn.createChannel().then(function(ch) {
20+
var ok = ch.assertQueue('hyperflow.jobs', {durable: true}).then(function(qok) { return qok.queue; });
21+
}));
1822
}, function(err) {
1923
console.error('[AMQP] Connect failed: %s', err);
2024
})

0 commit comments

Comments
 (0)