-
Notifications
You must be signed in to change notification settings - Fork 862
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 completed jobs from workers #383
Comments
So, you can write the same code in your master process, and remove all jobs on completion, or even you can bring up a simple maintenance node process to do so.... |
Hello, i have same issue with completed jobs. |
@slyder Nothing is created. your job status is just changed to complete :) |
@slyder if you want to distribute you job removal load also you can bind to job level complete event in your producers code, and remove them there. |
@behrad thanks! yes, i saw such code in example. |
We may be able to add an |
Yeah, It is what i suggesting! I think it will be usefull feature, because there are a lot of cases which does not require moving jobs to completed array. |
Would you please test this in real with the latest master branch and lemme know the results: jobs.create( ... ).attempts().removeOnComplete(true).save(); |
@behrad thanks for quick fix and it works now by the way i see a lot of places with 0 == arguments.length, why not to change it to |
Oh, my bad! a typo when merging branches.... |
I ran into issues when processing large numbers of jobs (1 million +) where if I didn't remove completed jobs, Redis' memory would balloon out.
So now in each worker, I have some code like so:
This runs on every worker, and they ALL try to remove the job. Ideally I'd like the worker who completed the job, to remove it from completed. Is this possible?
The text was updated successfully, but these errors were encountered: