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

[2.0] Expire monitored jobs #484

Merged
merged 1 commit into from
Jan 30, 2019
Merged

[2.0] Expire monitored jobs #484

merged 1 commit into from
Jan 30, 2019

Conversation

driesvints
Copy link
Member

This commit fixes the problem where completed jobs which were monitored by a tag are stored indefinitely and end up filling up the DB and cause the system to run out of memory. The main problem at hand was that these jobs were never cleaned up. By adding the max TTL and TrimMonitoredJobs listener the monitored jobs will be cleaned up after the given amount of time. By default this is set to 7 days. The listener itself will run one time each day.

This might be breaking because of the new method on the JobRepository interface. If you want me to send this to master instead please let me know. This would at the very least require a point release.

Fixes #333 #271

@fgilio
Copy link

fgilio commented Jan 29, 2019

This looks ok to me and I'd use it right away.
I do agree with you @driesvints on this #333 (comment)

This commit fixes the problem where completed jobs which were monitored by a tag are stored indefinitely and end up filling up the DB and cause the system to run out of memory. The main problem at hand was that these jobs were never cleaned up. By adding the max TTL and TrimMonitoredJobs listener the monitored jobs will be cleaned up after the given amount of time. By default this is set to 7 days. The listener itself will run one time each day.

Fixes #271
@taylorotwell taylorotwell merged commit 97a558a into laravel:2.0 Jan 30, 2019
@driesvints driesvints deleted the fix-incorrect-processes-count branch January 30, 2019 14:44
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 this pull request may close these issues.

3 participants