@@ -92,7 +92,7 @@ |
||
92 | 92 | $this->eventDispatcher->dispatch(Event::PRE_JOB, $event); |
93 | 93 | |
94 | 94 | $start = microtime(true); |
95 | - $handleException = function ($exception) use ($job) { |
|
95 | + $handleException = function($exception) use ($job) { |
|
96 | 96 | /** @var \Exception $exception */ |
97 | 97 | $exceptionMessage = get_class($exception)."\n".$exception->getCode().' - '.$exception->getMessage()."\n".$exception->getTraceAsString(); |
98 | 98 | $this->log('debug', "Failed: {$job->getClassName()}->{$job->getMethod()}"); |
@@ -33,7 +33,7 @@ |
||
33 | 33 | $total += count($this->jobs[$jobWorkerName]); |
34 | 34 | } |
35 | 35 | |
36 | - return array_sum(array_map(function ($jobs) { return count($jobs); }, $this->jobs)); |
|
36 | + return array_sum(array_map(function($jobs) { return count($jobs); }, $this->jobs)); |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | public function getStatus() |
@@ -74,7 +74,8 @@ |
||
74 | 74 | * |
75 | 75 | * @param string|null $workerName |
76 | 76 | * @param string|null $method |
77 | - * @param $conditionFunc |
|
77 | + * @param \Closure $conditionFunc |
|
78 | + * @param string $objectName |
|
78 | 79 | * |
79 | 80 | * @return int Count of jobs pruned |
80 | 81 | */ |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | */ |
64 | 64 | public function pruneErroneousJobs($workerName = null, $method = null) |
65 | 65 | { |
66 | - return $this->pruneJobs($workerName, $method, $this->getArchiveObjectName(), function ($qb) { |
|
66 | + return $this->pruneJobs($workerName, $method, $this->getArchiveObjectName(), function($qb) { |
|
67 | 67 | /* @var QueryBuilder $qb */ |
68 | 68 | $qb->where('j.status = :status') |
69 | 69 | ->setParameter(':status', BaseJob::STATUS_ERROR); |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | */ |
108 | 108 | public function pruneExpiredJobs($workerName = null, $method = null) |
109 | 109 | { |
110 | - return $this->pruneJobs($workerName, $method, $this->getObjectName(), function ($qb) { |
|
110 | + return $this->pruneJobs($workerName, $method, $this->getObjectName(), function($qb) { |
|
111 | 111 | /* @var QueryBuilder $qb */ |
112 | 112 | $qb->where('j.expiresAt <= :expiresAt') |
113 | 113 | ->setParameter(':expiresAt', new \DateTime()); |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | */ |
52 | 52 | public function pruneErroneousJobs($workerName = null, $method = null) |
53 | 53 | { |
54 | - return $this->pruneJobs($workerName, $method, $this->getArchiveObjectName(), function ($qb) { |
|
54 | + return $this->pruneJobs($workerName, $method, $this->getArchiveObjectName(), function($qb) { |
|
55 | 55 | /* @var Builder $qb */ |
56 | 56 | return $qb->field('status')->equals(BaseJob::STATUS_ERROR); |
57 | 57 | }); |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | */ |
100 | 100 | public function pruneExpiredJobs($workerName = null, $method = null) |
101 | 101 | { |
102 | - return $this->pruneJobs($workerName, $method, $this->getObjectName(), function ($qb) { |
|
102 | + return $this->pruneJobs($workerName, $method, $this->getObjectName(), function($qb) { |
|
103 | 103 | /* @var Builder $qb */ |
104 | 104 | return $qb->field('expiresAt')->lte(new \DateTime()); |
105 | 105 | }); |