- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 19
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
Expiring lock stores & lock's TTL fixes #96
base: 3.8
Are you sure you want to change the base?
Conversation
G81BVfaN
commented
Nov 21, 2024
•
edited
Loading
edited
- Adding the possibility to specify a TTL (Time To Live) for the lock.
- Stop refreshing the lock's TTL, if the lock store supports expiring.
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 😅 |
*/ | ||
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?
$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?