concrete/src/File/Image/Thumbnail/AtomicThumbnailStream.php
private function reserveNext(array $next, Connection $db)
    {
        $lockID = $this->getLockID();

        // First update the table
        try {
            $date = new \DateTime('now');
            $date->setTimestamp($date->getTimestamp() + $this->timeout);

            if (!$db->update($this->table, [
                $this->lockColumn => $lockID,
                $this->lockTimeoutColumn => $date->format('Y-m-d H:i:s')
            ], $next)
            ) {
                return false;
            }
        } catch (\Exception $e) {
            return false;
        }

        return $this->matchingLock($lockID, $next, $db);
    }
private function reserveNext(array $next, Connection $db)
    {
        $lockID = $this->getLockID();

        // First update the table
        try {
            $date = new \DateTime('now');
            $date->setTimestamp($date->getTimestamp() + $this->timeout);

            if (!$db->update($this->table, [
                $this->lockColumn => $lockID,
                $this->lockTimeoutColumn => $date->format('Y-m-d H:i:s')
            ], $next)
            ) {
                return false;
            }
        } catch (\Exception $e) {
            return false;
        }

        return $this->matchingLock($lockID, $next, $db);
    }
private function reserveNext ( array $ next , Connection $ db ) { $ lockID = $ this -> getLockID ( ) ; // First update the table try { $ date = new \ DateTime ( 'now' ) ; $ date -> setTimestamp ( $ date -> getTimestamp ( ) + $ this -> timeout ) ; if ( ! $ db -> update ( $ this -> table , [ $ this -> lockColumn => $ lockID , $ this -> lockTimeoutColumn => $ date -> format ( 'Y-m-d H:i:s' ) ] , $ next ) ) { return false ; } } catch ( \ Exception $ e ) { return false ; } return $ this -> matchingLock ( $ lockID , $ next , $ db ) ; }
Mark the next item as reserved
@param array $next
@param \Concrete\Core\Database\Connection\Connection $db
@return bool
Mark the next item as reserved