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

[8.x] add schedule:clear-mutex command #40135

Merged
merged 3 commits into from
Dec 22, 2021
Merged

[8.x] add schedule:clear-mutex command #40135

merged 3 commits into from
Dec 22, 2021

Conversation

bernardwiesner
Copy link
Contributor

Currently there is no way to clear the mutex files created when using withoutOverlap(). The only way to clear them is using php artisan cache:clear however this is dangerous since it clears all other cache as well.

If your server restarts while a task is running, the mutex file does not get deleted. Then when the server comes up, it could take up to 24 hours (default value) for your task to re-run because the mutex file still exists. The only way currently to solve this is just running cache:clear however this is not optimal.

In order to delete only mutex files I added a schedule:clear-mutex command.

@bernardwiesner
Copy link
Contributor Author

Adding an option like:
schedule:clear-mutex {signature?} would also be useful. I can add that too if there is a willingness for this feature.

@taylorotwell taylorotwell merged commit c3ce974 into laravel:8.x Dec 22, 2021
@bernardwiesner
Copy link
Contributor Author

just FYI Taylor renamed the method to schedule:clear-cache

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