@@ -152,6 +152,12 @@ |
||
| 152 | 152 | return Command::SUCCESS; |
| 153 | 153 | } |
| 154 | 154 | |
| 155 | + /** |
|
| 156 | + * @param integer $startTime |
|
| 157 | + * @param integer $maxRuntime |
|
| 158 | + * @param integer $idleTime |
|
| 159 | + * @param integer $maxJobs |
|
| 160 | + */ |
|
| 155 | 161 | private function runJobs($workerName, $startTime, $maxRuntime, $idleTime, $maxJobs, array $restrictedQueues, array $queueOptionsDefaults, array $queueOptions) |
| 156 | 162 | { |
| 157 | 163 | $hasPcntl = extension_loaded('pcntl'); |
@@ -110,6 +110,9 @@ |
||
| 110 | 110 | } |
| 111 | 111 | } |
| 112 | 112 | |
| 113 | + /** |
|
| 114 | + * @param integer $commandName |
|
| 115 | + */ |
|
| 113 | 116 | private function acquireLock($commandName, \DateTime $lastRunAt) |
| 114 | 117 | { |
| 115 | 118 | /** @var EntityManager $em */ |
@@ -413,7 +413,7 @@ |
||
| 413 | 413 | * Keys are preserved in the resulting collections. |
| 414 | 414 | * |
| 415 | 415 | * @param Closure $p The predicate on which to partition. |
| 416 | - * @return array An array with two elements. The first element contains the collection |
|
| 416 | + * @return ArrayCollection[] An array with two elements. The first element contains the collection |
|
| 417 | 417 | * of elements where the predicate returned TRUE, the second element |
| 418 | 418 | * contains the collection of elements where the predicate returned FALSE. |
| 419 | 419 | */ |
@@ -45,6 +45,9 @@ |
||
| 45 | 45 | $this->retryScheduler = $retryScheduler; |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | + /** |
|
| 49 | + * @return Job |
|
| 50 | + */ |
|
| 48 | 51 | public function findStartableJob($workerName, array &$excludedIds = array(), $excludedQueues = array(), $restrictedQueues = array()) |
| 49 | 52 | { |
| 50 | 53 | while (null !== $job = $this->findPendingJob($excludedIds, $excludedQueues, $restrictedQueues)) { |
@@ -6,7 +6,6 @@ |
||
| 6 | 6 | |
| 7 | 7 | use Doctrine\DBAL\Statement; |
| 8 | 8 | use Doctrine\DBAL\Types\Type; |
| 9 | - |
|
| 10 | 9 | use Symfony\Bundle\FrameworkBundle\Console\Application as BaseApplication; |
| 11 | 10 | use Symfony\Component\Console\Input\InputInterface; |
| 12 | 11 | use Symfony\Component\Console\Input\InputOption; |
@@ -60,7 +60,7 @@ |
||
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | /** |
| 63 | - * @return Job[] |
|
| 63 | + * @return \Generator |
|
| 64 | 64 | */ |
| 65 | 65 | private function findStaleJobs(EntityManager $em) |
| 66 | 66 | { |