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

Removing Repeatable job does not emit a Removed QueueEvent #1212

Closed
ericellb opened this issue Apr 25, 2022 · 0 comments · Fixed by #1229
Closed

Removing Repeatable job does not emit a Removed QueueEvent #1212

ericellb opened this issue Apr 25, 2022 · 0 comments · Fixed by #1229

Comments

@ericellb
Copy link

When removing a repeatable job using either removeRepeatable or removeRepeatableByKey, it does not emit a removed event on the QueueEvent class.

Here is a small example that can repro the issue.

// Register handler for removed
queueEvents.on('removed', () => {
  // No removal event is fired
});

// Create a repeatable job
queue.add('someJob', { repeat: { cron: '* * * * *' } });

// Remove the repeatable job
queue.removeRepeatable('someJob',  { repeat: { cron: '* * * * *' } });

When looking at the lua script removeRepeatable-2.lua It does not seem like the removed event is being sent to redis. However the removeJob script does.

This seems to be an oversight, and that the removeRepeatable-2.lua should also emit a removed event.

https://github.com/OptimalBits/bull/blob/develop/lib/commands/removeRepeatable-2.lua

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant