Pimcore\Cache\Tool\Warming::setTimoutBetweenIteration PHP Method

setTimoutBetweenIteration() public static method

public static setTimoutBetweenIteration ( integer $timoutBetweenIteration )
$timoutBetweenIteration integer
    public static function setTimoutBetweenIteration($timoutBetweenIteration)
    {
        self::$timoutBetweenIteration = $timoutBetweenIteration;
    }

Usage Example

 protected function execute(InputInterface $input, OutputInterface $output)
 {
     if ($input->getOption("maintenance-mode")) {
         // set the timeout between each iteration to 0 if maintenance mode is on, because
         // we don't have to care about the load on the server
         Warming::setTimoutBetweenIteration(0);
     }
     try {
         $types = $this->getArrayOption('types', 'validTypes', 'type', true);
         $documentTypes = $this->getArrayOption('documentTypes', 'validDocumentTypes', 'document type');
         $assetTypes = $this->getArrayOption('assetTypes', 'validAssetTypes', 'asset type');
         $objectTypes = $this->getArrayOption('objectTypes', 'validObjectTypes', 'object type');
     } catch (\InvalidArgumentException $e) {
         $this->writeError($e->getMessage());
         return 1;
     }
     if (in_array('document', $types)) {
         $this->writeWarmingMessage('document', $documentTypes);
         Warming::documents($documentTypes);
     }
     if (in_array('asset', $types)) {
         $this->writeWarmingMessage('asset', $assetTypes);
         Warming::assets($assetTypes);
     }
     if (in_array('object', $types)) {
         $this->writeWarmingMessage('object', $objectTypes);
         Warming::assets($assetTypes);
     }
     $this->disableMaintenanceMode();
 }
All Usage Examples Of Pimcore\Cache\Tool\Warming::setTimoutBetweenIteration