-
Notifications
You must be signed in to change notification settings - Fork 235
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(bull): adding pause queue button
- Loading branch information
1 parent
3651d52
commit 019f7f5
Showing
8 changed files
with
140 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
async function handler(req, res) { | ||
const {queueName, queueHost} = req.params; | ||
|
||
const {Queues} = req.app.locals; | ||
|
||
const queue = await Queues.get(queueName, queueHost); | ||
|
||
if (!queue) return res.status(404).json({error: 'queue not found'}); | ||
|
||
try { | ||
await queue.pause(); | ||
} catch (err) { | ||
return res.status(500).json({error: err.message}); | ||
} | ||
return res.sendStatus(200); | ||
} | ||
|
||
module.exports = handler; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
async function handler(req, res) { | ||
const {queueName, queueHost} = req.params; | ||
|
||
const {Queues} = req.app.locals; | ||
|
||
const queue = await Queues.get(queueName, queueHost); | ||
if (!queue) return res.status(404).json({error: 'queue not found'}); | ||
|
||
try { | ||
await queue.resume(); | ||
} catch (err) { | ||
return res.status(500).json({error: err.message}); | ||
} | ||
return res.sendStatus(200); | ||
} | ||
|
||
module.exports = handler; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters