setName('xtask:state')->setDescription('查看消息队列守护进程状态'); } /** * 执行查询操作 * @param Input $input * @param Output $output */ protected function execute(Input $input, Output $output) { if (($pid = $this->checkProcess()) > 0) { $output->info("message queue daemon {$pid} is runing."); } else { $output->info('The message queue daemon is not running.'); } } }