We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Crunz version: 2.2.0
PHP version: 7.3.19
Description The method preventOverlapping() does not work.
How to reproduce Create a long running task and let it run every minute. After a few minutes you can see that the task runs several times.
use Crunz\Schedule; $schedule = new Schedule(); $task = $schedule->run( static function () { sleep(500); return true; } ); $task->everyMinute() ->preventOverlapping(); return $schedule;
Additional context I found out that the method \Crunz\Event::lockKey() creates a new key every time I start the run command.
public function serialize() { ... $this->reference = spl_object_hash($this->closure); ... $ret = \serialize(array( ... 'self' => $this->reference, )); ... }
I suppose the part of the method \Opis\Closure\SerializableClosure::serialize() is the cause.
The text was updated successfully, but these errors were encountered:
Hello, after #313 you can specify lockKey yourself, that should resolve the problem.
lockKey
Sorry, something went wrong.
Yes, that's true but from my point of view this is more of a workaround. Maybe you could make it mandatory to hand over the key when using closures.
Fixed by #326, thanks @g19i85g.
No branches or pull requests
Crunz version: 2.2.0
PHP version: 7.3.19
Description
The method preventOverlapping() does not work.
How to reproduce
Create a long running task and let it run every minute.
After a few minutes you can see that the task runs several times.
Additional context
I found out that the method \Crunz\Event::lockKey() creates a new key every time I start the run command.
I suppose the part of the method \Opis\Closure\SerializableClosure::serialize() is the cause.
The text was updated successfully, but these errors were encountered: