Compare commits

..

No commits in common. "ac56fee761e111f799ce9a4cb62d4ab09eb13c0e" and "a5ce21d554fc60f2b545c5d7f327f35858647011" have entirely different histories.

2 changed files with 3 additions and 20 deletions

View file

@ -8,7 +8,6 @@ use Neos\Flow\Annotations as Flow;
use Neos\Flow\Http\Component\ComponentContext;
use Neos\Flow\Http\Component\ComponentInterface;
use Psr\Log\LoggerInterface;
use Symfony\Component\Lock\Exception\LockAcquiringException;
use Symfony\Component\Lock\Key;
use Symfony\Component\Lock\LockFactory;
@ -46,12 +45,6 @@ class SessionLockRequestComponent implements ComponentInterface
*/
protected bool $autoRelease;
/**
* @Flow\InjectConfiguration(package="DigiComp.FlowSessionLock", path="secondsToWait")
* @var int
*/
protected int $secondsToWait;
/**
* @inheritDoc
*/
@ -71,17 +64,8 @@ class SessionLockRequestComponent implements ComponentInterface
$componentContext->setParameter(SessionLockRequestComponent::class, static::PARAMETER_NAME, $lock);
$this->logger->debug('SessionLock: Try to get "' . $key . '"');
$timedOut = \time() + $this->secondsToWait;
while (!$lock->acquire() || $timedOut <= \time()) {
\usleep(100000);
}
if (!$lock->isAcquired()) {
throw new LockAcquiringException(
'Could not acquire the lock for "' . $key . '" in ' . $this->secondsToWait . ' seconds.',
1652687960
);
}
$this->logger->debug('SessionLock: Acquired "' . $key . '"');
$this->logger->debug('SessionLock: Get ' . $key);
$lock->acquire(true);
$this->logger->debug('SessionLock: Acquired ' . $key);
}
}

View file

@ -3,7 +3,6 @@ DigiComp:
lockStoreConnection: "flock://%FLOW_PATH_DATA%Temporary/Production/SessionLocks/"
timeToLive: 300.0
autoRelease: true
secondsToWait: 30
readOnlyExpressions: {}
Neos: