-
-
Notifications
You must be signed in to change notification settings - Fork 136
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
preventOverlapping for distinct tasks #313
Comments
Hello, i like your idea, but with a little different API. New method on
Would you like to provide a PR? |
There is already a function lockKey on the |
Yes, it is internal method and can be renamed safely. |
Description
preventOverlapping allows to skip a task if the previous execution is still running. Sometimes there are multiple distinct tasks that shouldn't run concurrently. If we are allowed to set "lockKey", we can easily accomplish that.
Example
One way to provide this feature would be as an extra parameter to preventOverlapping that overrides "lockKey".
Code
private function lockKey() { return $this->custom_lockkey ?? 'crunz-' . \md5($this->buildCommand()); }
The text was updated successfully, but these errors were encountered: