| @@ 65-70 (lines=6) @@ | ||
| 62 | */ |
|
| 63 | private function connect(array $hosts) |
|
| 64 | { |
|
| 65 | $callback = function (string $output) { |
|
| 66 | $output = preg_replace('/\n$/', '', $output); |
|
| 67 | if (strlen($output) !== 0) { |
|
| 68 | $this->output->writeln($output); |
|
| 69 | } |
|
| 70 | }; |
|
| 71 | ||
| 72 | // Connect to each host sequentially, to prevent getting locked. |
|
| 73 | foreach ($hosts as $host) { |
|
| @@ 139-144 (lines=6) @@ | ||
| 136 | } |
|
| 137 | } |
|
| 138 | ||
| 139 | $callback = function (string $output) { |
|
| 140 | $output = preg_replace('/\n$/', '', $output); |
|
| 141 | if (strlen($output) !== 0) { |
|
| 142 | $this->output->writeln($output); |
|
| 143 | } |
|
| 144 | }; |
|
| 145 | ||
| 146 | $this->startProcesses($processes); |
|
| 147 | ||