Classes/Service/QueueService.php
public function runSingleRequest(array $runEntry)
    {
        if (!\defined('SFC_QUEUE_WORKER')) {
            \define('SFC_QUEUE_WORKER', true);
        }

        $this->logger->debug('SFC Queue run', $runEntry);

        $clientService = GeneralUtility::makeInstance(ClientService::class);
        $statusCode = $clientService->runSingleRequest($runEntry['cache_url']);

        $data = [
            'call_date' => \time(),
            'call_result' => $statusCode,
        ];

        if (200 !== $statusCode) {
            // Call the flush, if the page is not accessable
            $cache = GeneralUtility::makeInstance(CacheService::class)->get();
            $cache->flushByTag('sfc_pageId_' . $runEntry['page_uid']);
            if ($cache->has($runEntry['cache_url'])) {
                $cache->remove($runEntry['cache_url']);
            }
        }

        $this->queueRepository->update($data, ['uid' => (int)$runEntry['uid']]);
    }
public function runSingleRequest(array $runEntry)
    {
        if (!\defined('SFC_QUEUE_WORKER')) {
            \define('SFC_QUEUE_WORKER', true);
        }

        $this->logger->debug('SFC Queue run', $runEntry);

        $clientService = GeneralUtility::makeInstance(ClientService::class);
        $statusCode = $clientService->runSingleRequest($runEntry['cache_url']);

        $data = [
            'call_date' => \time(),
            'call_result' => $statusCode,
        ];

        if (200 !== $statusCode) {
            // Call the flush, if the page is not accessable
            $cache = GeneralUtility::makeInstance(CacheService::class)->get();
            $cache->flushByTag('sfc_pageId_' . $runEntry['page_uid']);
            if ($cache->has($runEntry['cache_url'])) {
                $cache->remove($runEntry['cache_url']);
            }
        }

        $this->queueRepository->update($data, ['uid' => (int)$runEntry['uid']]);
    }
public function runSingleRequest ( array $ runEntry ) { if ( ! \ defined ( 'SFC_QUEUE_WORKER' ) ) { \ define ( 'SFC_QUEUE_WORKER' , true ) ; } $ this -> logger -> debug ( 'SFC Queue run' , $ runEntry ) ; $ clientService = GeneralUtility :: makeInstance ( ClientService :: class ) ; $ statusCode = $ clientService -> runSingleRequest ( $ runEntry [ 'cache_url' ] ) ; $ data = [ 'call_date' => \ time ( ) , 'call_result' => $ statusCode , ] ; if ( 200 !== $ statusCode ) { // Call the flush, if the page is not accessable $ cache = GeneralUtility :: makeInstance ( CacheService :: class ) -> get ( ) ; $ cache -> flushByTag ( 'sfc_pageId_' . $ runEntry [ 'page_uid' ] ) ; if ( $ cache -> has ( $ runEntry [ 'cache_url' ] ) ) { $ cache -> remove ( $ runEntry [ 'cache_url' ] ) ; } } $ this -> queueRepository -> update ( $ data , [ 'uid' => ( int ) $ runEntry [ 'uid' ] ] ) ; }
Run a single request with guzzle.

@param array $runEntry

@throws \TYPO3\CMS\Core\Cache\Exception\NoSuchCacheException
Run a single request with guzzle .