@@ -31,8 +31,8 @@ |
||
| 31 | 31 | ->end() |
| 32 | 32 | ->arrayNode('beanstalkd') |
| 33 | 33 | ->children() |
| 34 | - ->scalarNode('host')->end() |
|
| 35 | - ->scalarNode('tube')->end() |
|
| 34 | + ->scalarNode('host')->end() |
|
| 35 | + ->scalarNode('tube')->end() |
|
| 36 | 36 | ->end() |
| 37 | 37 | ->end() |
| 38 | 38 | ->arrayNode('rabbit_mq') |
@@ -172,7 +172,7 @@ |
||
| 172 | 172 | set_time_limit($processTimeout); // Set timeout on the process |
| 173 | 173 | |
| 174 | 174 | if ($jobId = $input->getOption('id')) { |
| 175 | - return $this->runJobById($start, $jobId); // Run a single job |
|
| 175 | + return $this->runJobById($start, $jobId); // Run a single job |
|
| 176 | 176 | } |
| 177 | 177 | |
| 178 | 178 | return $this->runLoop($start, $workerName, $methodName, $nanoSleep, $maxCount, $duration); |
@@ -130,7 +130,7 @@ |
||
| 130 | 130 | if ($method) { |
| 131 | 131 | $qb->where($qb->expr()->andX( |
| 132 | 132 | $qb->expr()->eq('j.workerName', ':workerName'), |
| 133 | - $qb->expr()->eq('j.method', ':method') |
|
| 133 | + $qb->expr()->eq('j.method', ':method') |
|
| 134 | 134 | )) |
| 135 | 135 | ->setParameter(':method', $method); |
| 136 | 136 | } else { |
@@ -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()}"); |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | |
| 167 | 167 | $countProcessed = 0; |
| 168 | 168 | for ($i = 0, $count = count($stalledJobs); $i < $count; $i += static::FETCH_COUNT) { |
| 169 | - for ($j = $i, $max = $i + static::FETCH_COUNT; $j < $max && $j < $count; ++$j ) { |
|
| 169 | + for ($j = $i, $max = $i + static::FETCH_COUNT; $j < $max && $j < $count; ++$j) { |
|
| 170 | 170 | $job = $stalledJobs[$j]; |
| 171 | 171 | /* Job $job */ |
| 172 | 172 | $job->setStatus(Job::STATUS_NEW); |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | |
| 189 | 189 | $countProcessed = 0; |
| 190 | 190 | for ($i = 0, $count = count($stalledJobs); $i < $count; $i += static::FETCH_COUNT) { |
| 191 | - for ($j = $i, $max = $i + static::FETCH_COUNT; $j < $max && $j < $count; ++$j ) { |
|
| 191 | + for ($j = $i, $max = $i + static::FETCH_COUNT; $j < $max && $j < $count; ++$j) { |
|
| 192 | 192 | $job = $stalledJobs[$j]; |
| 193 | 193 | $objectManager->remove($job); |
| 194 | 194 | ++$countProcessed; |
@@ -156,7 +156,7 @@ |
||
| 156 | 156 | |
| 157 | 157 | $start = microtime(true); |
| 158 | 158 | $jobsTotal = 100; // have to trim this down as Travis is slow. |
| 159 | - self::$jobManager->enableSorting = false; // Ignore priority |
|
| 159 | + self::$jobManager->enableSorting = false; // Ignore priority |
|
| 160 | 160 | |
| 161 | 161 | for ($i = 0; $i < $jobsTotal; ++$i) { |
| 162 | 162 | $startLater = microtime(true); |
@@ -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() |