|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace Dtc\QueueBundle\Model; |
|
4
|
|
|
|
|
5
|
|
|
use Dtc\QueueBundle\Exception\UnsupportedException; |
|
6
|
|
|
|
|
7
|
|
|
abstract class AbstractJobManager implements JobManagerInterface |
|
8
|
|
|
{ |
|
9
|
|
|
abstract public function getJob($workerName = null, $methodName = null, $prioritize = true, $runId = null); |
|
10
|
|
|
|
|
11
|
|
|
abstract public function save(Job $job); |
|
12
|
|
|
|
|
13
|
|
|
abstract public function saveHistory(Job $job); |
|
14
|
|
|
|
|
15
|
2 |
|
public function resetStalledJobs($workerName = null, $method = null) |
|
16
|
|
|
{ |
|
17
|
2 |
|
throw new UnsupportedException('Unsupported'); |
|
18
|
|
|
} |
|
19
|
|
|
|
|
20
|
2 |
|
public function pruneStalledJobs($workerName = null, $method = null) |
|
21
|
|
|
{ |
|
22
|
2 |
|
throw new UnsupportedException('Unsupported'); |
|
23
|
|
|
} |
|
24
|
|
|
|
|
25
|
2 |
|
public function resetErroneousJobs($workerName = null, $methodName = null) |
|
26
|
|
|
{ |
|
27
|
2 |
|
throw new UnsupportedException('Unsupported'); |
|
28
|
|
|
} |
|
29
|
|
|
|
|
30
|
2 |
|
public function pruneErroneousJobs($workerName = null, $methodName = null) |
|
31
|
|
|
{ |
|
32
|
2 |
|
throw new UnsupportedException('Unsupported'); |
|
33
|
|
|
} |
|
34
|
|
|
|
|
35
|
|
|
/** |
|
36
|
|
|
* @return array |
|
37
|
|
|
* |
|
38
|
|
|
* @throws UnsupportedException |
|
39
|
|
|
*/ |
|
40
|
1 |
|
public function getStatus() |
|
41
|
|
|
{ |
|
42
|
1 |
|
throw new UnsupportedException('Unsupported'); |
|
43
|
|
|
} |
|
44
|
|
|
|
|
45
|
1 |
|
public function getJobCount($workerName = null, $methodName = null) |
|
46
|
|
|
{ |
|
47
|
1 |
|
throw new UnsupportedException('Unsupported'); |
|
48
|
|
|
} |
|
49
|
|
|
|
|
50
|
|
|
public function deleteJob(Job $job) |
|
51
|
|
|
{ |
|
52
|
|
|
throw new UnsupportedException('Unsupported'); |
|
53
|
|
|
} |
|
54
|
|
|
|
|
55
|
2 |
|
public function pruneExpiredJobs($workerName = null, $methodName = null) |
|
56
|
|
|
{ |
|
57
|
2 |
|
throw new UnsupportedException('Unsupported'); |
|
58
|
|
|
} |
|
59
|
|
|
|
|
60
|
2 |
|
public function pruneArchivedJobs(\DateTime $olderThan) |
|
61
|
|
|
{ |
|
62
|
2 |
|
throw new UnsupportedException('Unsupported'); |
|
63
|
|
|
} |
|
64
|
|
|
} |
|
65
|
|
|
|