| @@ 59-64 (lines=6) @@ | ||
| 56 | */ |
|
| 57 | private function connect(array $hosts) |
|
| 58 | { |
|
| 59 | $callback = function (string $output) { |
|
| 60 | $output = preg_replace('/\n$/', '', $output); |
|
| 61 | if (strlen($output) !== 0) { |
|
| 62 | $this->output->writeln($output); |
|
| 63 | } |
|
| 64 | }; |
|
| 65 | ||
| 66 | // Connect to each host sequentially, to prevent getting locked. |
|
| 67 | foreach ($hosts as $host) { |
|
| @@ 173-178 (lines=6) @@ | ||
| 170 | return 0; |
|
| 171 | } |
|
| 172 | ||
| 173 | $callback = function (string $output) { |
|
| 174 | $output = preg_replace('/\n$/', '', $output); |
|
| 175 | if (strlen($output) !== 0) { |
|
| 176 | $this->output->writeln($output); |
|
| 177 | } |
|
| 178 | }; |
|
| 179 | ||
| 180 | $this->startProcesses($processes); |
|
| 181 | ||