src/Command/RpcCommand.php
public function reload()
    {
        $rpcServer = $this->getRpcServer();

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

        // 打印信息
        output()->writeln(sprintf('<info>Server %s is reloading ...</info>', input()->getFullScript()));

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

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

        // 打印信息
        output()->writeln(sprintf('<info>Server %s is reloading ...</info>', input()->getFullScript()));

        // 重载
        $reloadTask = input()->hasOpt('t');
        $rpcServer->reload($reloadTask);
        output()->writeln(sprintf('<success>Server %s is reload success</success>', input()->getFullScript()));
    }
public function reload ( ) { $ rpcServer = $ this -> getRpcServer ( ) ; // 是否已启动 if ( ! $ rpcServer -> isRunning ( ) ) { output ( ) -> writeln ( '<error>The server is not running! cannot reload</error>' , true , true ) ; } // 打印信息 output ( ) -> writeln ( sprintf ( '<info>Server %s is reloading ...</info>' , input ( ) -> getFullScript ( ) ) ) ; // 重载 $ reloadTask = input ( ) -> hasOpt ( 't' ) ; $ rpcServer -> reload ( $ reloadTask ) ; output ( ) -> writeln ( sprintf ( '<success>Server %s is reload success</success>' , input ( ) -> getFullScript ( ) ) ) ; }
reload worker process

@Usage
{fullCommand} [arguments] [options]
@Options
-t     Only to reload task processes, default to reload worker and task
@Example
php swoft.php rpc:reload
reload worker process