diff --git a/Classes/Http/SessionLockRequestComponent.php b/Classes/Http/SessionLockRequestComponent.php index 6a76898..964e9e2 100644 --- a/Classes/Http/SessionLockRequestComponent.php +++ b/Classes/Http/SessionLockRequestComponent.php @@ -31,6 +31,18 @@ class SessionLockRequestComponent implements ComponentInterface */ protected $lockFactory; + /** + * @Flow\InjectConfiguration(package="DigiComp.FlowSessionLock", path="autoRelease") + * @var bool + */ + protected bool $autoRelease; + + /** + * @Flow\InjectConfiguration(package="DigiComp.FlowSessionLock", path="timeToLive") + * @var int + */ + protected int $timeToLive; + /** * @inheritDoc */ @@ -50,7 +62,7 @@ class SessionLockRequestComponent implements ComponentInterface 'session-' . $sessionIdentifier ); //TODO: sessionIdentifier might be wrong, probably it should probably be storage identifier - $lock = $this->lockFactory->createLockFromKey($key, 300, false); + $lock = $this->lockFactory->createLockFromKey($key, $this->timeToLive, $this->autoRelease); $componentContext->setParameter(SessionLockRequestComponent::class, 'sessionLock', $lock); diff --git a/Configuration/Settings.yaml b/Configuration/Settings.yaml index b55eb19..e49711d 100644 --- a/Configuration/Settings.yaml +++ b/Configuration/Settings.yaml @@ -12,3 +12,5 @@ DigiComp: FlowSessionLock: lockStoreDir: '%FLOW_PATH_DATA%Temporary/Production/SessionLocks' readOnlyExpressions: [] + autoRelease: true + timeToLive: 300