-
-
Notifications
You must be signed in to change notification settings - Fork 22
Expiring lock stores & lock's TTL fixes #96
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
base: 3.9
Are you sure you want to change the base?
Conversation
|
Please do |
be85011 to
cb4e1b8
Compare
|
Done, but the |
cb4e1b8 to
4004aba
Compare
Rookie mistake, i rebased with our fork's origin, instead of the upstream's origin 😅 |
src/Event.php
Outdated
| * @throws CrunzException | ||
| */ | ||
| public function preventOverlapping(?object $store = null) | ||
| public function preventOverlapping(?object $store = null, ?int $ttl = 30) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why null is allowed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's now back to only int.
| $this->skip(function () { | ||
| $lock = $this->createLockObject(); | ||
| $this->skip(function () use ($ttl) { | ||
| $lock = $this->createLockObject($ttl); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about some tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a very basic test:
test_expiring_store_can_be_passed_to_prevent_overlapping_with_ttl()
e6ebec0 to
487a9c6
Compare
Uh oh!
There was an error while loading. Please reload this page.