-
Notifications
You must be signed in to change notification settings - Fork 31
Command with different params is not working #22
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
Comments
Hi @moazam1, Thank you for your kind words! 🙏 There are two different concepts for artisan console commands - arguments and options. By default, Laravel Console Mutex takes into account only arguments when it generates the mutex name. But you can easily change that behavior by overriding the PS:
To be honest, that part of the package has changed several times. Initially, it was simply an info message with I hope it helps! 👍 |
@dmitry-ivanov thank you for the message. I am using Lumen 5.5.x. Due to package dependencies I can't upgrade my Lumen version to see MutexRuntimeException. Right now I am getting RuntimeException. Do you have any suggestion how to prevent this exception? I don't want to put it in the ignore list. |
Thank you so much! |
You're welcome! 👍 |
Hi,
First of all great work. For some reasons Laravel's withoutOverlapping() method didn't work for me because I was seeing same commands overlapping so I opt in to use your package. I think Laravel team should use your package!
I have a command which accepts different arguments i.e. php artisan --action=cleanup or php artisan --action=check-db --table=xyz
Both commands are doing different nature of tasks so your package shouldn't throw error. Is there any chance you can add lock based on the params passed to command?
Also, it would be great if you can add an option to show a warning message instead of throwing exception: Command is running now! A variable like this in the class will work fine $this->useWarning = true; or have a setting?
The text was updated successfully, but these errors were encountered: