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
Remove bull jobs after processing #1040
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
big dubs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like Bull let's you pass removeOnComplete
as a default option to the queue constructor, which means we don't have to worry about accidentally forgetting to pass it to some call to add. Maybe a bit safer?
(Randomly, the original GH issue for this + PR was by this React "celebrity dev" max stoiber!)
Actually looks like they made this the default behavior of Bull at some point - maybe we just have to upgrade? |
@piazzatron i'm trying that and it seems to work but somehow the test you wrote for manual syncs being triggered first broke when i made it a queue default as opposed to a job option. trying to fix now so that's the reason this is taking some time |
@piazzatron user error. can you look again |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beautiful
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's get it
Trello Card Link
https://trello.com/c/Hb52wyQl/1665-remove-bull-jobs-after-processing
Description
Bull jobs never get cleaned up from Redis so it eats away at system memory slowly. This change cleans it up after each processes
Services
Does it touch a critical flow like Discovery indexing, Creator Node track upload, Creator Node gateway, or Creator Node file system?
Delete an option.
How Has This Been Tested?
Locally checked redis before uploading a track to make sure it was empty. Uploaded the track and hit the gateway to make sure the IPFS rehydrate job doesn't leave anything behind in redis
Before any actions
After upload
After secondary sync
Although there are aggregate keys still in redis, It's definitely cleaning up after itself more