@@ -25,16 +25,16 @@ |
||
25 | 25 | protected function configure() |
26 | 26 | { |
27 | 27 | $this->setName('pjbserver:restart') |
28 | - ->setDescription( |
|
29 | - 'Restart the standalone pjb server (java)' |
|
30 | - ) |
|
31 | - ->addArgument( |
|
32 | - 'config-file', |
|
33 | - InputArgument::REQUIRED, |
|
34 | - 'Configuration file, see ./dist/pjbserver.config.php.dist' |
|
35 | - ) |
|
36 | - ->setHelp( |
|
37 | - <<<'EOT' |
|
28 | + ->setDescription( |
|
29 | + 'Restart the standalone pjb server (java)' |
|
30 | + ) |
|
31 | + ->addArgument( |
|
32 | + 'config-file', |
|
33 | + InputArgument::REQUIRED, |
|
34 | + 'Configuration file, see ./dist/pjbserver.config.php.dist' |
|
35 | + ) |
|
36 | + ->setHelp( |
|
37 | + <<<'EOT' |
|
38 | 38 | Start the php java bridge server in the background. |
39 | 39 | EOT |
40 | 40 | ); |
@@ -21,11 +21,11 @@ |
||
21 | 21 | */ |
22 | 22 | public function logServerConfig(ConsoleLogger $logger, Config $config): void |
23 | 23 | { |
24 | - $logger->info('* config port :' . $config->getPort()); |
|
25 | - $logger->info('* config log_file :' . $config->getLogFile()); |
|
26 | - $logger->info('* config pid_file :' . $config->getPidFile()); |
|
27 | - $logger->info('* config classpaths :' . implode(',', $config->getClasspaths())); |
|
28 | - $logger->info('* config java_bin :' . $config->getJavaBin()); |
|
29 | - $logger->info('* config server_jar :' . $config->getServerJar()); |
|
24 | + $logger->info('* config port :'.$config->getPort()); |
|
25 | + $logger->info('* config log_file :'.$config->getLogFile()); |
|
26 | + $logger->info('* config pid_file :'.$config->getPidFile()); |
|
27 | + $logger->info('* config classpaths :'.implode(',', $config->getClasspaths())); |
|
28 | + $logger->info('* config java_bin :'.$config->getJavaBin()); |
|
29 | + $logger->info('* config server_jar :'.$config->getServerJar()); |
|
30 | 30 | } |
31 | 31 | } |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | public function isRunning(int $pid): bool |
40 | 40 | { |
41 | 41 | $cmd = sprintf('kill -0 %d 2>&1', $pid); |
42 | - $this->logger->debug(__METHOD__ . ": Exec command: $cmd"); |
|
42 | + $this->logger->debug(__METHOD__.": Exec command: $cmd"); |
|
43 | 43 | exec($cmd, $output, $return_var); |
44 | 44 | |
45 | 45 | return $return_var === 0; |
@@ -57,13 +57,13 @@ discard block |
||
57 | 57 | if ($wait) { |
58 | 58 | $sleep_time = '0.2'; |
59 | 59 | $cmd = sprintf('kill %d; while ps -p %d; do sleep %s;done;', $pid, $pid, $sleep_time); |
60 | - $this->logger->debug(__METHOD__ . " Exec command: $cmd"); |
|
60 | + $this->logger->debug(__METHOD__." Exec command: $cmd"); |
|
61 | 61 | exec($cmd, $output, $return_var); |
62 | 62 | $killed = ($return_var === 0); |
63 | 63 | if ($killed) { |
64 | - $this->logger->debug(__METHOD__ . " Successfully killed process {$pid}"); |
|
64 | + $this->logger->debug(__METHOD__." Successfully killed process {$pid}"); |
|
65 | 65 | } else { |
66 | - $this->logger->notice(__METHOD__ . " Cannot kill process {$pid}, $output"); |
|
66 | + $this->logger->notice(__METHOD__." Cannot kill process {$pid}, $output"); |
|
67 | 67 | } |
68 | 68 | } else { |
69 | 69 | //@todo |