public function reload()
    {
        $httpServer = $this->getHttpServer();

        // 是否已启动
        if (!$httpServer->isRunning()) {
            output()->writeln('<error>The server is not running! cannot reload</error>', true, true);
        }

        output()->writeln(sprintf('<info>Server %s is reloading</info>', input()->getScript()));

        // 重载
        $reloadTask = input()->hasOpt('t');
        $httpServer->reload($reloadTask);
        output()->writeln(sprintf('<success>Server %s reload success</success>', input()->getScript()));
    }
public function reload()
    {
        $httpServer = $this->getHttpServer();

        // 是否已启动
        if (!$httpServer->isRunning()) {
            output()->writeln('<error>The server is not running! cannot reload</error>', true, true);
        }

        output()->writeln(sprintf('<info>Server %s is reloading</info>', input()->getScript()));

        // 重载
        $reloadTask = input()->hasOpt('t');
        $httpServer->reload($reloadTask);
        output()->writeln(sprintf('<success>Server %s reload success</success>', input()->getScript()));
    }
public function reload ( ) { $ httpServer = $ this -> getHttpServer ( ) ; // 是否已启动 if ( ! $ httpServer -> isRunning ( ) ) { output ( ) -> writeln ( '<error>The server is not running! cannot reload</error>' , true , true ) ; } output ( ) -> writeln ( sprintf ( '<info>Server %s is reloading</info>' , input ( ) -> getScript ( ) ) ) ; // 重载 $ reloadTask = input ( ) -> hasOpt ( 't' ) ; $ httpServer -> reload ( $ reloadTask ) ; output ( ) -> writeln ( sprintf ( '<success>Server %s reload success</success>' , input ( ) -> getScript ( ) ) ) ; }
Reload worker processes

@Usage {fullCommand} [-t]
@Options
-t      Only to reload task processes, default to reload worker and task
@Example {fullCommand}
@throws \InvalidArgumentException
@throws \RuntimeException
Reload worker processes