| @@ 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) { |
|
| @@ 149-154 (lines=6) @@ | ||
| 146 | } |
|
| 147 | } |
|
| 148 | ||
| 149 | $callback = function (string $output) { |
|
| 150 | $output = preg_replace('/\n$/', '', $output); |
|
| 151 | if (strlen($output) !== 0) { |
|
| 152 | $this->output->writeln($output); |
|
| 153 | } |
|
| 154 | }; |
|
| 155 | ||
| 156 | $this->startProcesses($processes); |
|
| 157 | ||