Fix cancelall method in server to delete all jobs of a failed type#115
Open
databus23 wants to merge 1 commit intoseomoz:masterfrom
Open
Fix cancelall method in server to delete all jobs of a failed type#115databus23 wants to merge 1 commit intoseomoz:masterfrom
databus23 wants to merge 1 commit intoseomoz:masterfrom
Conversation
The number of jobs returned by `client.jobs.failed FAILURE_TYPE` defaults to the first 25 of that type. To delete all jobs of one type at once we need to explicitly specify the number of failed jobs.
Contributor
|
Thanks, @databus23! For perf reasons, I'm thinking that maybe this should use |
Contributor
Author
|
Sure, I didn't notice that method. I'm just wondering if there is a maximum length for arguments when calling a redis lua script? I couldn't find anything about that in the documentation. But even if it is the case we could still pass chunks of jids to Speaking of performance, it would also be beneficial to avoid the creation of all these Job objects just to map those right back to the plain
in the cancelall of |
Contributor
|
+1 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The number of jobs returned by
client.jobs.failed FAILURE_TYPEdefaults to the first 25 of that type. To delete all jobs of one type at once we need to explicitly specify the number of failed jobs.