Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Commit

Permalink
🐛 Wait for queue to be created
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandChowdhary committed Feb 29, 2020
1 parent 76403fc commit 3235c24
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@staart/manager",
"version": "1.3.44",
"version": "1.3.45",
"main": "index.js",
"repository": "[email protected]:staart/api.git",
"author": "Anand Chowdhary <[email protected]>",
Expand Down Expand Up @@ -125,5 +125,5 @@
"setup"
],
"snyk": true,
"staart-version": "1.3.44"
"staart-version": "1.3.45"
}
2 changes: 1 addition & 1 deletion src/helpers/elasticsearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const setupQueue = async () => {
if (queueSetup) return true;
const queues = redisQueue.listQueuesAsync();
if ((await queues).includes(ELASTIC_QUEUE)) return (queueSetup = true);
redisQueue.createQueueAsync({ qname: ELASTIC_QUEUE });
await redisQueue.createQueueAsync({ qname: ELASTIC_QUEUE });
return (queueSetup = true);
};

Expand Down
2 changes: 1 addition & 1 deletion src/helpers/mail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const setupQueue = async () => {
if (queueSetup) return true;
const queues = redisQueue.listQueuesAsync();
if ((await queues).includes(MAIL_QUEUE)) return (queueSetup = true);
redisQueue.createQueueAsync({ qname: MAIL_QUEUE });
await redisQueue.createQueueAsync({ qname: MAIL_QUEUE });
return (queueSetup = true);
};

Expand Down
2 changes: 1 addition & 1 deletion src/helpers/webhooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const setupQueue = async () => {
if (queueSetup) return true;
const queues = redisQueue.listQueuesAsync();
if ((await queues).includes(WEBHOOK_QUEUE)) return (queueSetup = true);
redisQueue.createQueueAsync({ qname: WEBHOOK_QUEUE });
await redisQueue.createQueueAsync({ qname: WEBHOOK_QUEUE });
return (queueSetup = true);
};

Expand Down

0 comments on commit 3235c24

Please sign in to comment.