@@ -24,6 +24,9 @@ |
||
24 | 24 | } |
25 | 25 | } |
26 | 26 | |
27 | + /** |
|
28 | + * @param string $type |
|
29 | + */ |
|
27 | 30 | protected function validateManagerType($type) |
28 | 31 | { |
29 | 32 | $managerType = $this->container->getParameter($type); |
@@ -36,7 +36,6 @@ discard block |
||
36 | 36 | /** |
37 | 37 | * @Route("/timings", name="dtc_queue_timings") |
38 | 38 | * |
39 | - * @param Request $request |
|
40 | 39 | */ |
41 | 40 | public function getTimingsAction() |
42 | 41 | { |
@@ -56,6 +55,10 @@ discard block |
||
56 | 55 | return new JsonResponse($params); |
57 | 56 | } |
58 | 57 | |
58 | + /** |
|
59 | + * @param \DateTime|null $beginDate |
|
60 | + * @param \DateTime $endDate |
|
61 | + */ |
|
59 | 62 | protected function calculateTimings($type, $beginDate, $endDate) |
60 | 63 | { |
61 | 64 | $params = []; |
@@ -105,7 +108,7 @@ discard block |
||
105 | 108 | * Timings offset by timezone if necessary. |
106 | 109 | * |
107 | 110 | * @param array $timingsDates |
108 | - * @param $format |
|
111 | + * @param string $format |
|
109 | 112 | * |
110 | 113 | * @return array |
111 | 114 | */ |
@@ -54,6 +54,9 @@ discard block |
||
54 | 54 | $this->addLiveJobs($container); |
55 | 55 | } |
56 | 56 | |
57 | + /** |
|
58 | + * @param string $type |
|
59 | + */ |
|
57 | 60 | protected function setupAlias(ContainerBuilder $container, $defaultManagerType, $type) |
58 | 61 | { |
59 | 62 | $definitionName = 'dtc_queue.'.$type.'.'.$defaultManagerType; |
@@ -84,7 +87,6 @@ discard block |
||
84 | 87 | |
85 | 88 | /** |
86 | 89 | * @param ContainerBuilder $container |
87 | - * @param Reference[] $jobManagerRef |
|
88 | 90 | * @param string $jobClass |
89 | 91 | */ |
90 | 92 | protected function setupTaggedServices(ContainerBuilder $container, Definition $definition, $jobClass) |
@@ -212,6 +214,11 @@ discard block |
||
212 | 214 | return $managerType; |
213 | 215 | } |
214 | 216 | |
217 | + /** |
|
218 | + * @param string $managerType |
|
219 | + * @param string $type |
|
220 | + * @param string $className |
|
221 | + */ |
|
215 | 222 | protected function getClass(ContainerBuilder $container, $managerType, $type, $className, $baseClass) |
216 | 223 | { |
217 | 224 | $runClass = $container->hasParameter('dtc_queue.class_'.$type) ? $container->getParameter('dtc_queue.class_'.$type) : null; |
@@ -365,6 +365,10 @@ discard block |
||
365 | 365 | return $workersMethods; |
366 | 366 | } |
367 | 367 | |
368 | + /** |
|
369 | + * @param string $workerName |
|
370 | + * @param string $methodName |
|
371 | + */ |
|
368 | 372 | public function countLiveJobs($workerName = null, $methodName = null) |
369 | 373 | { |
370 | 374 | /** @var DocumentManager $objectManager */ |
@@ -378,6 +382,11 @@ discard block |
||
378 | 382 | return $builder->getQuery()->count(); |
379 | 383 | } |
380 | 384 | |
385 | + /** |
|
386 | + * @param string $workerName |
|
387 | + * @param string $methodName |
|
388 | + * @param \Closure $progressCallback |
|
389 | + */ |
|
381 | 390 | public function archiveAllJobs($workerName = null, $methodName = null, $progressCallback) |
382 | 391 | { |
383 | 392 | /** @var DocumentManager $documentManager */ |
@@ -242,6 +242,7 @@ discard block |
||
242 | 242 | * @param string $workerName |
243 | 243 | * @param string $methodName |
244 | 244 | * @param bool $prioritize |
245 | + * @param integer $runId |
|
245 | 246 | * |
246 | 247 | * @return Job|null |
247 | 248 | */ |
@@ -268,8 +269,8 @@ discard block |
||
268 | 269 | } |
269 | 270 | |
270 | 271 | /** |
271 | - * @param null $workerName |
|
272 | - * @param null $methodName |
|
272 | + * @param string|null $workerName |
|
273 | + * @param string|null $methodName |
|
273 | 274 | * @param bool $prioritize |
274 | 275 | * |
275 | 276 | * @return QueryBuilder |
@@ -346,7 +347,7 @@ discard block |
||
346 | 347 | * |
347 | 348 | * @param \Dtc\QueueBundle\Model\Job $job |
348 | 349 | * |
349 | - * @return mixed|null |
|
350 | + * @return null|Job |
|
350 | 351 | */ |
351 | 352 | public function updateNearestBatch(\Dtc\QueueBundle\Model\Job $job) |
352 | 353 | { |
@@ -375,6 +376,10 @@ discard block |
||
375 | 376 | return $existingJob; |
376 | 377 | } |
377 | 378 | |
379 | + /** |
|
380 | + * @param integer $newPriority |
|
381 | + * @param null|\DateTime $newWhenAt |
|
382 | + */ |
|
378 | 383 | protected function updateBatchJob(Job $existingJob, $newPriority, $newWhenAt) |
379 | 384 | { |
380 | 385 | $existingPriority = $existingJob->getPriority(); |
@@ -426,6 +431,10 @@ discard block |
||
426 | 431 | return $workerMethods; |
427 | 432 | } |
428 | 433 | |
434 | + /** |
|
435 | + * @param string $workerName |
|
436 | + * @param string $methodName |
|
437 | + */ |
|
429 | 438 | public function countLiveJobs($workerName = null, $methodName = null) |
430 | 439 | { |
431 | 440 | /** @var EntityRepository $repository */ |
@@ -438,6 +447,11 @@ discard block |
||
438 | 447 | return $queryBuilder->getQuery()->getSingleScalarResult(); |
439 | 448 | } |
440 | 449 | |
450 | + /** |
|
451 | + * @param string $workerName |
|
452 | + * @param string $methodName |
|
453 | + * @param \Closure $progressCallback |
|
454 | + */ |
|
441 | 455 | public function archiveAllJobs($workerName = null, $methodName = null, $progressCallback) |
442 | 456 | { |
443 | 457 | // First mark all Live non-running jobs as Archive |
@@ -35,6 +35,9 @@ |
||
35 | 35 | return parent::getColumns(); |
36 | 36 | } |
37 | 37 | |
38 | + /** |
|
39 | + * @param boolean $flag |
|
40 | + */ |
|
38 | 41 | public function setRunning($flag) |
39 | 42 | { |
40 | 43 | $this->running = $flag; |