Pimcore\Console\Command\InternalUpdateProcessorCommand::execute PHP Method

execute() protected method

protected execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $status = ["success" => true];
        $config = $input->getArgument("config");
        if ($config) {
            $job = json_decode($config, true);
            if (is_array($job)) {
                if (isset($job["dry-run"])) {
                    // do not do anything here
                    Logger::info("skipped update job because it is in dry-run mode", $job);
                } elseif ($job["type"] == "files") {
                    Update::installData($job["revision"]);
                } elseif ($job["type"] == "clearcache") {
                    \Pimcore\Cache::clearAll();
                } elseif ($job["type"] == "preupdate") {
                    $status = Update::executeScript($job["revision"], "preupdate");
                } elseif ($job["type"] == "postupdate") {
                    $status = Update::executeScript($job["revision"], "postupdate");
                } elseif ($job["type"] == "cleanup") {
                    Update::cleanup();
                }
            }
        }
        $this->output->write(json_encode($status));
    }
InternalUpdateProcessorCommand