Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(remove-repeatable): consider old versions of bull #580

Merged
merged 1 commit into from
Nov 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,10 @@ You can `docker pull` Arena from [Docker Hub](https://hub.docker.com/r/mixmaxhq/

Please see the [docker-arena] repository for details.

### Official UIs

- [Taskforce](https://taskforce.sh) for Bull and Bullmq

### Contributing

See [contributing guidelines](CONTRIBUTING.md) and [an example](example/README.md).
Expand Down
6 changes: 5 additions & 1 deletion src/server/views/api/repeatableJobRemove.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ async function handler(req, res) {
if (!job) return res.status(404).send({error: 'job not found'});

try {
await queue.removeRepeatableByKey(job.opts.repeat.key);
if (job.opts.repeat.key) {
await queue.removeRepeatableByKey(job.opts.repeat.key);
} else {
await queue.removeRepeatable(job.name, job.opts.repeat);
}
return res.sendStatus(200);
} catch (e) {
const body = {
Expand Down
3 changes: 1 addition & 2 deletions src/server/views/dashboard/jobDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ async function handler(req, res) {
job.showRetryButton = !queue.IS_BEE || jobState === 'failed';
job.retryButtonText = jobState === 'failed' ? 'Retry' : 'Trigger';
job.showPromoteButton = !queue.IS_BEE && jobState === 'delayed';
job.showDeleteRepeatableButton =
queue.IS_BULL && job.opts.repeat && job.opts.repeat.key;
job.showDeleteRepeatableButton = queue.IS_BULL && job.opts.repeat;
const stacktraces = queue.IS_BEE ? job.options.stacktraces : job.stacktrace;

if (!queue.IS_BEE) {
Expand Down
3 changes: 1 addition & 2 deletions src/server/views/dashboard/queueJobsByState.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,7 @@ async function _html(req, res) {
job.showRetryButton = !queue.IS_BEE || jobState === 'failed';
job.retryButtonText = jobState === 'failed' ? 'Retry' : 'Trigger';
job.showPromoteButton = !queue.IS_BEE && jobState === 'delayed';
job.showDeleteRepeatableButton =
queue.IS_BULL && job.opts.repeat && job.opts.repeat.key;
job.showDeleteRepeatableButton = queue.IS_BULL && job.opts.repeat;
job.parent = JobHelpers.getKeyProperties(job.parentKey);
}

Expand Down