| @@ 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) { |
|
| @@ 180-185 (lines=6) @@ | ||
| 177 | return 0; |
|
| 178 | } |
|
| 179 | ||
| 180 | $callback = function (string $output) { |
|
| 181 | $output = preg_replace('/\n$/', '', $output); |
|
| 182 | if (strlen($output) !== 0) { |
|
| 183 | $this->output->writeln($output); |
|
| 184 | } |
|
| 185 | }; |
|
| 186 | ||
| 187 | $this->startProcesses($processes); |
|
| 188 | ||