@@ -80,7 +80,7 @@ |
||
80 | 80 | } |
81 | 81 | |
82 | 82 | $format = $this->getDateFormat($type); |
83 | - usort($timingsDates, function ($date1str, $date2str) use ($format) { |
|
83 | + usort($timingsDates, function($date1str, $date2str) use ($format) { |
|
84 | 84 | $date1 = \DateTime::createFromFormat($format, $date1str); |
85 | 85 | $date2 = \DateTime::createFromFormat($format, $date2str); |
86 | 86 | if (!$date2) { |
@@ -36,7 +36,7 @@ |
||
36 | 36 | $total += count($this->jobs[$jobWorkerName]); |
37 | 37 | } |
38 | 38 | |
39 | - return array_sum(array_map(function ($jobs) { |
|
39 | + return array_sum(array_map(function($jobs) { |
|
40 | 40 | return count($jobs); |
41 | 41 | }, $this->jobs)); |
42 | 42 | } |
@@ -87,7 +87,6 @@ |
||
87 | 87 | |
88 | 88 | /** |
89 | 89 | * @param ContainerBuilder $container |
90 | - * @param string $jobClass |
|
91 | 90 | */ |
92 | 91 | protected function setupTaggedServices(ContainerBuilder $container, Definition $definition) |
93 | 92 | { |
@@ -110,6 +110,10 @@ discard block |
||
110 | 110 | } |
111 | 111 | } |
112 | 112 | |
113 | + /** |
|
114 | + * @param string $workerName |
|
115 | + * @param string $method |
|
116 | + */ |
|
113 | 117 | public function pruneExpiredJobs($workerName = null, $method = null) |
114 | 118 | { |
115 | 119 | $count = $this->updateExpired($workerName, $method); |
@@ -234,6 +238,10 @@ discard block |
||
234 | 238 | } |
235 | 239 | } |
236 | 240 | |
241 | + /** |
|
242 | + * @param integer $i |
|
243 | + * @param integer $count |
|
244 | + */ |
|
237 | 245 | protected function runStalledLoop($i, $count, array $stalledJobs) |
238 | 246 | { |
239 | 247 | $resetCount = 0; |
@@ -336,6 +344,9 @@ discard block |
||
336 | 344 | */ |
337 | 345 | abstract protected function stopIdGenerator($objectName); |
338 | 346 | |
347 | + /** |
|
348 | + * @param string $objectName |
|
349 | + */ |
|
339 | 350 | abstract protected function restoreIdGenerator($objectName); |
340 | 351 | |
341 | 352 | /** |
@@ -372,6 +383,9 @@ discard block |
||
372 | 383 | return $countProcessed; |
373 | 384 | } |
374 | 385 | |
386 | + /** |
|
387 | + * @param string $function |
|
388 | + */ |
|
375 | 389 | protected function resetSaveOk($function) |
376 | 390 | { |
377 | 391 | } |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | |
21 | 21 | /** |
22 | 22 | * @param RetryableJob $job |
23 | - * @param $retry bool |
|
23 | + * @param boolean $retry bool |
|
24 | 24 | * |
25 | 25 | * @return |
26 | 26 | */ |
@@ -44,7 +44,6 @@ discard block |
||
44 | 44 | /** |
45 | 45 | * @return bool true if retry |
46 | 46 | * |
47 | - * @param bool $retry true if the job was retried, false if not |
|
48 | 47 | */ |
49 | 48 | public function saveHistory(Job $job) |
50 | 49 | { |
@@ -67,6 +66,10 @@ discard block |
||
67 | 66 | return $this->updateJobMax($job, 'Exceptions', RetryableJob::STATUS_MAX_EXCEPTIONS, $this->autoRetryOnException); |
68 | 67 | } |
69 | 68 | |
69 | + /** |
|
70 | + * @param string $type |
|
71 | + * @param boolean $autoRetry |
|
72 | + */ |
|
70 | 73 | protected function updateJobMax(RetryableJob $job, $type, $maxStatus, $autoRetry) |
71 | 74 | { |
72 | 75 | $setMethod = 'set'.$type; |
@@ -121,7 +124,6 @@ discard block |
||
121 | 124 | } |
122 | 125 | |
123 | 126 | /** |
124 | - * @param RetryableJob $retryableJob |
|
125 | 127 | * |
126 | 128 | * @return bool true if the job was successfully "reset", i.e. re-queued |
127 | 129 | */ |
@@ -157,7 +159,7 @@ discard block |
||
157 | 159 | } |
158 | 160 | |
159 | 161 | /** |
160 | - * @param int|null $defaultMaxRetry |
|
162 | + * @param int|null $defaultMaxRetries |
|
161 | 163 | */ |
162 | 164 | public function setDefaultMaxRetries($defaultMaxRetries) |
163 | 165 | { |
@@ -173,7 +175,7 @@ discard block |
||
173 | 175 | } |
174 | 176 | |
175 | 177 | /** |
176 | - * @param int|null $defaultMaxFailure |
|
178 | + * @param int|null $defaultMaxFailures |
|
177 | 179 | */ |
178 | 180 | public function setDefaultMaxFailures($defaultMaxFailures) |
179 | 181 | { |
@@ -221,7 +223,7 @@ discard block |
||
221 | 223 | } |
222 | 224 | |
223 | 225 | /** |
224 | - * @param int|null $defaultMaxException |
|
226 | + * @param int|null $defaultMaxExceptions |
|
225 | 227 | */ |
226 | 228 | public function setDefaultMaxExceptions($defaultMaxExceptions) |
227 | 229 | { |
@@ -83,7 +83,7 @@ |
||
83 | 83 | } |
84 | 84 | |
85 | 85 | /** |
86 | - * @param int|null $defaultMaxStalled |
|
86 | + * @param int|null $defaultMaxStalls |
|
87 | 87 | */ |
88 | 88 | public function setDefaultMaxStalls($defaultMaxStalls) |
89 | 89 | { |
@@ -51,6 +51,9 @@ discard block |
||
51 | 51 | $this->workers[$worker->getName()] = $worker; |
52 | 52 | } |
53 | 53 | |
54 | + /** |
|
55 | + * @param string $name |
|
56 | + */ |
|
54 | 57 | public function getWorker($name) |
55 | 58 | { |
56 | 59 | if (isset($this->workers[$name])) { |
@@ -70,6 +73,9 @@ discard block |
||
70 | 73 | $this->logFunc = $callable; |
71 | 74 | } |
72 | 75 | |
76 | + /** |
|
77 | + * @param string $level |
|
78 | + */ |
|
73 | 79 | public function log($level, $msg, array $context = []) |
74 | 80 | { |
75 | 81 | if ($this->logFunc) { |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | } |
28 | 28 | |
29 | 29 | /** |
30 | - * @return mixed |
|
30 | + * @return integer |
|
31 | 31 | */ |
32 | 32 | public function getMaxFailures() |
33 | 33 | { |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | } |
36 | 36 | |
37 | 37 | /** |
38 | - * @param mixed $maxFailure |
|
38 | + * @param mixed $maxFailures |
|
39 | 39 | */ |
40 | 40 | public function setMaxFailures($maxFailures) |
41 | 41 | { |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | } |
122 | 122 | |
123 | 123 | /** |
124 | - * @return mixed |
|
124 | + * @return integer |
|
125 | 125 | */ |
126 | 126 | public function getMaxExceptions() |
127 | 127 | { |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | } |
130 | 130 | |
131 | 131 | /** |
132 | - * @param mixed $maxException |
|
132 | + * @param mixed $maxExceptions |
|
133 | 133 | */ |
134 | 134 | public function setMaxExceptions($maxExceptions) |
135 | 135 | { |
@@ -39,8 +39,8 @@ |
||
39 | 39 | } |
40 | 40 | |
41 | 41 | /** |
42 | - * @param int $stalledCount |
|
43 | 42 | * |
43 | + * @param integer $stalls |
|
44 | 44 | * @return StallableJob |
45 | 45 | */ |
46 | 46 | public function setStalls($stalls) |