Sindbad~EG File Manager

Current Path : /proc/self/root/proc/self/root/proc/self/root/opt/nginxhttpd_/src/Command/
Upload File :
Current File : //proc/self/root/proc/self/root/proc/self/root/opt/nginxhttpd_/src/Command/OpenrestyWarmup.php

<?php

namespace App\Command;

use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class OpenrestyWarmup extends BaseCommand
{
    protected static $defaultName = 'openresty:warmup';

    protected function configure(){
        $this
            ->setDescription("Purge the OpenResty internal cache used to store SSL file and proxypass data")
            ->setHelp("This command will purge the OpenResty internal (in memory) cache used to stored encoded 
                            SSL file and ProxyPass data. It does not change/refresh the data inside the redis DB. 
                            It will force OpenResty to re-query the Redis DB which is our source of truth.");
    }

    protected function execute(InputInterface $input, OutputInterface $output){
        $r = $this->openrestyApiClient->warmup();

        if($output->isVerbose()){
            $output->writeln("Api response = " . $this->openrestyApiClient->getLastRawResponse());
        }

        if($r){
            $output->writeln("OpenResty internal cache warmed-up successfully");
            return Command::SUCCESS;
        }

        $this->writeError($output, "OpenResty internal cache not warmed up", BaseCommand::RETURN_GENERIC_ERR);
    }
}

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists