@@ -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() |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | */ |
63 | 63 | public function pruneErroneousJobs($workerName = null, $method = null) |
64 | 64 | { |
65 | - return $this->pruneJobs($workerName, $method, $this->getArchiveObjectName(), function ($qb) { |
|
65 | + return $this->pruneJobs($workerName, $method, $this->getArchiveObjectName(), function($qb) { |
|
66 | 66 | /* @var QueryBuilder $qb */ |
67 | 67 | $qb->where('j.status = :status') |
68 | 68 | ->setParameter(':status', Job::STATUS_ERROR); |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | */ |
107 | 107 | public function pruneExpiredJobs($workerName = null, $method = null) |
108 | 108 | { |
109 | - return $this->pruneJobs($workerName, $method, $this->getObjectName(), function ($qb) { |
|
109 | + return $this->pruneJobs($workerName, $method, $this->getObjectName(), function($qb) { |
|
110 | 110 | /* @var QueryBuilder $qb */ |
111 | 111 | $qb->where('j.expiresAt <= :expiresAt') |
112 | 112 | ->setParameter(':expiresAt', new \DateTime()); |
@@ -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 | */ |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | */ |
51 | 51 | public function pruneErroneousJobs($workerName = null, $method = null) |
52 | 52 | { |
53 | - return $this->pruneJobs($workerName, $method, $this->getArchiveObjectName(), function ($qb) { |
|
53 | + return $this->pruneJobs($workerName, $method, $this->getArchiveObjectName(), function($qb) { |
|
54 | 54 | /* @var Builder $qb */ |
55 | 55 | return $qb->field('status')->equals(Job::STATUS_ERROR); |
56 | 56 | }); |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | */ |
99 | 99 | public function pruneExpiredJobs($workerName = null, $method = null) |
100 | 100 | { |
101 | - return $this->pruneJobs($workerName, $method, $this->getObjectName(), function ($qb) { |
|
101 | + return $this->pruneJobs($workerName, $method, $this->getObjectName(), function($qb) { |
|
102 | 102 | /* @var Builder $qb */ |
103 | 103 | return $qb->field('expiresAt')->lte(new \DateTime()); |
104 | 104 | }); |