Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature #26232 [Lock] Add a TTL to refresh lock (jderusse)
This PR was merged into the 4.1-dev branch. Discussion ---------- [Lock] Add a TTL to refresh lock | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | see LockInterface's comment | Tests pass? | yes | Fixed tickets | NA | License | MIT | Doc PR | NA Using remote locks in long processes needs to defines a fined grain refresh TTL. For instance, when looping over a long list of jobs we can extends the live of the lock by few seconds before processing each item. But when the the jobs is splitted and each part to take the same time, we can not define the best TTL Exemple ``` $lock->acquire(); $this->2minutesJob(); $lock->refresh(); $this->5minutesJob(); $lock->refresh(); $this->1minutesJob(); ``` The purpose of this PR is to be able to override the default TTL ``` $lock->acquire(); $lock->refresh(120); $this->2minutesJob(); $lock->refresh(300); $this->5minutesJob(); $lock->refresh(60); $this->1minutesJob(); ``` Commits ------- 3b1f328 Add a TTL to refresh lock
- Loading branch information
Showing
3 changed files
with
24 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters