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

[3.x] Allow trimming completed jobs #720

Merged
merged 1 commit into from Feb 14, 2020

Conversation

themsaid
Copy link
Member

@themsaid themsaid commented Dec 9, 2019

High memory consumption was reported in #715. Between v3.2.2 and the most recent version, I couldn't locate a change that may cause this.

However, the proposed solution in the issue seems useful. Basically, this PR adds the ability to purge completed jobs separately, so for example you may keep your recent jobs fo 60 minutes, failed jobs for 7 days, but purge completed jobs every 5 minutes.

One side effect of this change is that the list of recent jobs may include a lot of completed jobs that were purged but still exist in the recent_jobs set and thus paginated results will look strange.

One thing we can do is to have a separate list for:

  • Pending Jobs
  • Completed Jobs
  • Failed jobs

@driesvints driesvints changed the title Allow trimming completed jobs [3.x] Allow trimming completed jobs Dec 9, 2019
@taylorotwell
Copy link
Member

Personally I'm not comfortable with the way this basically breaks pagination. I'm open to other suggestions though.

@taylorotwell taylorotwell reopened this Feb 14, 2020
@taylorotwell taylorotwell merged commit f0295ee into laravel:3.0 Feb 14, 2020
@mkantautas
Copy link

mkantautas commented Mar 5, 2020

@themsaid This undermines recent. If you have a config from earlier versions with e.g. 'recent' => 1440, // 24 hours , then it is being ignored (recent jobs won't be visible for 24 hours). It's a breaking change and should have been added to a major release only.

@mkantautas
Copy link

completed is also not mentioned in the docs @taylorotwell

@themsaid
Copy link
Member Author

themsaid commented Mar 6, 2020

@neorganic please upgrade to Horizon 4.0 where the issue doesn't exist.

@mkantautas
Copy link

@themsaid Well that's not possible because my project is on 5.8 Laravel, but will have this in mind.

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.

None yet

3 participants