Exemple #1
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     parent::execute($input, $output);
     if ($status = $this->daemon->status()) {
         $output->writeln("<info>Aurora is working! Master Process PID:[{$status['pid']}]</info>");
     } else {
         $output->writeln('<warning>Aurora has stopped working!</warning>');
     }
 }
Exemple #2
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     parent::execute($input, $output);
     if (false === ($status = $this->daemon->status())) {
         throw new Exception("Error: Aurora is not working!");
     }
     if (!$this->daemon->stop()) {
         throw new Exception("Error: Unable to make Aurora stop working!");
     }
     $output->writeln('<warning>Aurora has stopped working!</warning>');
 }
Exemple #3
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     parent::execute($input, $output);
     if (false !== ($status = $this->daemon->status())) {
         throw new Exception("Error: Aurora is already working! Master Process PID:[{$status['pid']}]");
     }
     /** @var \Aurora\Console\Application $application */
     $application = $this->getApplication();
     $application->do($this->daemon->start());
     $output->writeln('<info>Aurora is working!</info>');
 }
Exemple #4
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     parent::execute($input, $output);
     if (false !== $this->daemon->status()) {
         if (!$this->daemon->stop()) {
             throw new Exception("Error: Unable to make Aurora stop working!");
         }
         $output->writeln('<warning>Aurora has stopped working!</warning>');
     }
     /** @var \Aurora\Console\Application $application */
     $application = $this->getApplication();
     $application->do($this->daemon->start());
     $output->writeln('<info>Aurora is working!</info>');
 }