Completed
Pull Request — master (#30)
by Matthew
19:54
created

AbstractJobManager::pruneExceptionJobs()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

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