| @@ 129-137 (lines=9) @@ | ||
| 126 | * @param int[] $customerIds | |
| 127 | * @param int $numberOfThreads | |
| 128 | */ | |
| 129 | protected function startProcesses(array $customerIds, int $numberOfThreads): void | |
| 130 |     { | |
| 131 | $chunkSize = $this->chunkSizeCalculator->calculateChunkSize($customerIds, $numberOfThreads); | |
| 132 | $threadedCustomerIds = array_chunk($customerIds, $chunkSize); | |
| 133 |         foreach ($threadedCustomerIds as $customerIdsForSingleThread) { | |
| 134 | $this->createProcessDefinition($this->getFullCommand($customerIdsForSingleThread)); | |
| 135 | } | |
| 136 | $this->loop->run(); | |
| 137 | } | |
| 138 | ||
| 139 | /** | |
| 140 | * @param string $command | |
| @@ 142-150 (lines=9) @@ | ||
| 139 | * @param array $customerIds | |
| 140 | * @param int $numberOfThreads | |
| 141 | */ | |
| 142 | protected function startProcesses(array $customerIds, int $numberOfThreads): void | |
| 143 |     { | |
| 144 | $chunkSize = $this->chunkSizeCalculator->calculateChunkSize($customerIds, $numberOfThreads); | |
| 145 | $threadedCustomerIds = array_chunk($customerIds, $chunkSize); | |
| 146 |         foreach ($threadedCustomerIds as $customerIdsForSingleThread) { | |
| 147 | $this->createRequestDefinition($customerIdsForSingleThread); | |
| 148 | } | |
| 149 | $this->loop->run(); | |
| 150 | } | |
| 151 | ||
| 152 | /** | |
| 153 | * @param int[] $customerIds | |