Completed
Push — master ( 2db41f...aa6ae6 )
by Matthew
15:06 queued 36s
created

AbstractJobManager::resetStalledJobs()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 2
crap 1
1
<?php
2
3
namespace Dtc\QueueBundle\Model;
4
5
use Dtc\QueueBundle\Exception\UnsupportedException;
6
7
abstract class AbstractJobManager implements JobManagerInterface
8
{
9
    protected $jobTiminigManager;
10
    protected $jobClass;
11
    protected $runManager;
12
13 31
    public function __construct(RunManager $runManager, JobTimingManager $jobTimingManager, $jobClass)
14
    {
15 31
        $this->runManager = $runManager;
16 31
        $this->jobTiminigManager = $jobTimingManager;
17 31
        $this->jobClass = $jobClass;
18 31
    }
19
20
    /**
21
     * @return string
22
     */
23 36
    public function getJobClass()
24
    {
25 36
        return $this->jobClass;
26
    }
27
28
    /**
29
     * @return JobTimingManager
30
     */
31 6
    public function getJobTimingManager()
32
    {
33 6
        return $this->jobTiminigManager;
34
    }
35
36
    /**
37
     * @return RunManager
38
     */
39 4
    public function getRunManager()
40
    {
41 4
        return $this->runManager;
42
    }
43
44
    abstract public function getJob($workerName = null, $methodName = null, $prioritize = true, $runId = null);
45
46
    abstract public function save(Job $job);
47
48
    abstract public function saveHistory(Job $job);
49
50 3
    public function resetStalledJobs($workerName = null, $method = null)
51
    {
52 3
        throw new UnsupportedException('Unsupported');
53
    }
54
55 3
    public function pruneStalledJobs($workerName = null, $method = null)
56
    {
57 3
        throw new UnsupportedException('Unsupported');
58
    }
59
60 3
    public function resetErroneousJobs($workerName = null, $methodName = null)
61
    {
62 3
        throw new UnsupportedException('Unsupported');
63
    }
64
65 3
    public function pruneErroneousJobs($workerName = null, $methodName = null)
66
    {
67 3
        throw new UnsupportedException('Unsupported');
68
    }
69
70
    /**
71
     * @return array
72
     *
73
     * @throws UnsupportedException
74
     */
75 2
    public function getStatus()
76
    {
77 2
        throw new UnsupportedException('Unsupported');
78
    }
79
80 2
    public function getJobCount($workerName = null, $methodName = null)
81
    {
82 2
        throw new UnsupportedException('Unsupported');
83
    }
84
85 1
    public function deleteJob(Job $job)
86
    {
87 1
        throw new UnsupportedException('Unsupported');
88
    }
89
90 3
    public function pruneExpiredJobs($workerName = null, $methodName = null)
91
    {
92 3
        throw new UnsupportedException('Unsupported');
93
    }
94
95 3
    public function pruneArchivedJobs(\DateTime $olderThan)
96
    {
97 3
        throw new UnsupportedException('Unsupported');
98
    }
99
}
100