File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -16,14 +16,15 @@ final class RoadRunnerStore implements SharedLockStoreInterface
1616{
1717 public function __construct (
1818 private readonly RrLockInterface $ rrLock ,
19+ private float $ initialTtl = 300.0 ,
1920 ) {
2021 }
2122
2223 public function save (Key $ key ): void
2324 {
2425 \assert (false === $ key ->hasState (__CLASS__ ));
2526 try {
26- $ lockId = $ this ->rrLock ->lock ((string ) $ key );
27+ $ lockId = $ this ->rrLock ->lock ((string ) $ key, null , $ this -> initialTtl );
2728 if (false === $ lockId ) {
2829 throw new LockConflictedException ('RoadRunner. Failed to make lock ' );
2930 }
@@ -36,7 +37,7 @@ public function save(Key $key): void
3637 public function saveRead (Key $ key ): void
3738 {
3839 \assert (false === $ key ->hasState (__CLASS__ ));
39- $ lockId = $ this ->rrLock ->lockRead ((string )$ key );
40+ $ lockId = $ this ->rrLock ->lockRead ((string )$ key, null , $ this -> initialTtl );
4041 if (false === $ lockId ) {
4142 throw new LockConflictedException ('RoadRunner. Failed to make read lock ' );
4243 }
You can’t perform that action at this time.
0 commit comments