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] Scale to the maxProcesses if timeToClearAll is zero #718

Merged
merged 2 commits into from
Dec 6, 2019

Conversation

themsaid
Copy link
Member

@themsaid themsaid commented Dec 6, 2019

Ref: #667

When you first start Horizon, before finishing any jobs, the timeToClearAll will be equal to zero. This will make Horizon scale down to the minProcesses set on the supervisor.

Once your first job finishes, timeToClearAll will start having values that the auto scaler can use to decide if it should scale up or down.

The problem is that before finishing any jobs, even if you have 10 jobs waiting, Horizon will scale down to minProcesses because timeToClearAll is still zero.

This PR changes the behaviour by checking if there are any jobs waiting and only scale down if there aren't any.

@driesvints driesvints changed the title Scale to the maxProcesses if timeToClearAll is zero [3.x] Scale to the maxProcesses if timeToClearAll is zero Dec 6, 2019
@taylorotwell taylorotwell merged commit 24a05e6 into laravel:3.0 Dec 6, 2019
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.

2 participants