QueueRunner   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 17
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A runQueue() 0 11 2
1
<?php
2
3
namespace Symbiote\QueuedJobs\Tasks\Engines;
4
5
use Symbiote\QueuedJobs\DataObjects\QueuedJobDescriptor;
6
7
/**
8
 * Runs all jobs in a queue loop in one process
9
 */
10
class QueueRunner extends BaseRunner implements TaskRunnerEngine
11
{
12
    /**
13
     * @param string $queue
14
     */
15
    public function runQueue($queue)
16
    {
17
        $service = $this->getService();
18
19
        $nextJob = $service->getNextPendingJob($queue);
20
        $this->logDescriptorStatus($nextJob, $queue);
21
22
        if ($nextJob instanceof QueuedJobDescriptor) {
23
            $service->processJobQueue($queue);
24
        }
25
    }
26
}
27