1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Dtc\QueueBundle\Tests; |
4
|
|
|
|
5
|
|
|
use Dtc\QueueBundle\Manager\StallableJobManager; |
6
|
|
|
use Dtc\QueueBundle\Model\Job; |
7
|
|
|
use Dtc\QueueBundle\Model\RetryableJob; |
8
|
|
|
use Dtc\QueueBundle\Model\StallableJob; |
9
|
|
|
|
10
|
|
|
class StubJobManager extends StallableJobManager |
11
|
|
|
{ |
12
|
|
|
use RecordingTrait; |
13
|
|
|
|
14
|
|
|
public function getJob($workerName = null, $methodName = null, $prioritize = true, $runId = null) |
15
|
|
|
{ |
16
|
|
|
return $this->recordArgs(__FUNCTION__, func_get_args()); |
17
|
|
|
} |
18
|
|
|
|
19
|
|
|
public function saveHistory(Job $job) |
20
|
|
|
{ |
21
|
|
|
return $this->recordArgs(__FUNCTION__, func_get_args()); |
22
|
|
|
} |
23
|
|
|
|
24
|
|
|
public function save(Job $job) |
25
|
|
|
{ |
26
|
|
|
return $this->recordArgs(__FUNCTION__, func_get_args()); |
27
|
|
|
} |
28
|
|
|
|
29
|
|
|
protected function stallableSave(StallableJob $job) |
30
|
|
|
{ |
31
|
|
|
return $this->recordArgs(__FUNCTION__, func_get_args()); |
32
|
|
|
} |
33
|
|
|
|
34
|
|
|
protected function resetJob(RetryableJob $job) |
35
|
|
|
{ |
36
|
|
|
return $this->recordArgs(__FUNCTION__, func_get_args()); |
37
|
|
|
} |
38
|
|
|
|
39
|
|
|
protected function stallableSaveHistory(StallableJob $job, $retry) |
40
|
|
|
{ |
41
|
|
|
return $this->recordArgs(__FUNCTION__, func_get_args()); |
42
|
|
|
} |
43
|
|
|
|
44
|
|
|
public function pruneArchivedJobs(\DateTime $olderThan) |
45
|
|
|
{ |
46
|
|
|
return $this->recordArgs(__FUNCTION__, func_get_args()); |
47
|
|
|
} |
48
|
|
|
|
49
|
|
|
public function pruneExpiredJobs($workerName = null, $methodName = null) |
50
|
|
|
{ |
51
|
|
|
return $this->recordArgs(__FUNCTION__, func_get_args()); |
52
|
|
|
} |
53
|
|
|
|
54
|
|
|
public function pruneErroneousJobs($workerName = null, $methodName = null) |
|
|
|
|
55
|
|
|
{ |
56
|
|
|
return $this->recordArgs(__FUNCTION__, func_get_args()); |
57
|
|
|
} |
58
|
|
|
|
59
|
|
|
public function pruneStalledJobs($workerName = null, $method = null, callable $progressCallback = null) |
60
|
|
|
{ |
61
|
|
|
return $this->recordArgs(__FUNCTION__, func_get_args()); |
62
|
|
|
} |
63
|
|
|
|
64
|
|
|
public function deleteJob(Job $job) |
65
|
|
|
{ |
66
|
|
|
return $this->recordArgs(__FUNCTION__, func_get_args()); |
67
|
|
|
} |
68
|
|
|
|
69
|
|
|
public function getWaitingJobCount($workerName = null, $methodName = null) |
70
|
|
|
{ |
71
|
|
|
return $this->recordArgs(__FUNCTION__, func_get_args()); |
72
|
|
|
} |
73
|
|
|
|
74
|
|
|
public function getStatus() |
75
|
|
|
{ |
76
|
|
|
return $this->recordArgs(__FUNCTION__, func_get_args()); |
77
|
|
|
} |
78
|
|
|
|
79
|
|
|
public function resetExceptionJobs($workerName = null, $methodName = null) |
80
|
|
|
{ |
81
|
|
|
return $this->recordArgs(__FUNCTION__, func_get_args()); |
82
|
|
|
} |
83
|
|
|
|
84
|
|
|
public function resetStalledJobs($workerName = null, $method = null, callable $progressCallback = null) |
85
|
|
|
{ |
86
|
|
|
return $this->recordArgs(__FUNCTION__, func_get_args()); |
87
|
|
|
} |
88
|
|
|
} |
89
|
|
|
|
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.