src/Event.php
public function refreshLock(): void
    {
        if (!$this->preventOverlapping) {
            return;
        }

        $lock = $this->createLockObject();
        $remainingLifetime = $lock->getRemainingLifetime();

        // Lock will never expire
        if (null === $remainingLifetime) {
            return;
        }

        // Refresh 15s before lock expiration
        $lockRefreshNeeded = $remainingLifetime < 15;
        if ($lockRefreshNeeded) {
            $lock->refresh();
        }
    }
public function refreshLock(): void
    {
        if (!$this->preventOverlapping) {
            return;
        }

        $lock = $this->createLockObject();
        $remainingLifetime = $lock->getRemainingLifetime();

        // Lock will never expire
        if (null === $remainingLifetime) {
            return;
        }

        // Refresh 15s before lock expiration
        $lockRefreshNeeded = $remainingLifetime < 15;
        if ($lockRefreshNeeded) {
            $lock->refresh();
        }
    }
public function refreshLock ( ) : void { if ( ! $ this -> preventOverlapping ) { return ; } $ lock = $ this -> createLockObject ( ) ; $ remainingLifetime = $ lock -> getRemainingLifetime ( ) ; // Lock will never expire if ( null === $ remainingLifetime ) { return ; } // Refresh 15s before lock expiration $ lockRefreshNeeded = $ remainingLifetime < 15 ; if ( $ lockRefreshNeeded ) { $ lock -> refresh ( ) ; } }
If this event is prevented from overlapping, this method should be called regularly to refresh the lock.
If this event is prevented from overlapping this method should be called regularly to refresh the lock .