1 | <?php |
||
10 | class Run |
||
11 | { |
||
12 | protected $id; |
||
13 | protected $startedAt; |
||
14 | protected $endedAt; |
||
15 | protected $elapsed; |
||
16 | protected $duration; // How long to run for in seconds |
||
17 | protected $lastHeartbeatAt; |
||
18 | protected $maxCount; |
||
19 | protected $processed; // Number of jobs processed |
||
20 | protected $hostname; |
||
21 | protected $pid; |
||
22 | |||
23 | /** |
||
24 | * @return mixed |
||
25 | */ |
||
26 | 9 | public function getId() |
|
27 | { |
||
28 | 9 | return $this->id; |
|
29 | } |
||
30 | |||
31 | /** |
||
32 | * @param mixed $id |
||
33 | */ |
||
34 | 9 | public function setId($id) |
|
35 | { |
||
36 | 9 | $this->id = $id; |
|
37 | 9 | } |
|
38 | |||
39 | /** |
||
40 | * @return \DateTime|null |
||
41 | */ |
||
42 | 4 | public function getStartedAt() |
|
43 | { |
||
44 | 4 | return $this->startedAt; |
|
45 | } |
||
46 | |||
47 | /** |
||
48 | * @param \DateTime $startedAt |
||
49 | */ |
||
50 | public function setStartedAt(\DateTime $startedAt) |
||
51 | { |
||
52 | $this->startedAt = $startedAt; |
||
53 | } |
||
54 | |||
55 | /** |
||
56 | * @return \DateTime|null |
||
57 | */ |
||
58 | 4 | public function getEndedAt() |
|
59 | { |
||
60 | 4 | return $this->endedAt; |
|
61 | } |
||
62 | |||
63 | /** |
||
64 | * @param \DateTime $endedAt |
||
65 | */ |
||
66 | 4 | public function setEndedAt(\DateTime $endedAt) |
|
67 | { |
||
68 | 4 | $this->endedAt = $endedAt; |
|
69 | 4 | } |
|
70 | |||
71 | /** |
||
72 | * @return int |
||
73 | */ |
||
74 | 9 | public function getDuration() |
|
75 | { |
||
76 | 9 | return $this->duration; |
|
77 | } |
||
78 | |||
79 | /** |
||
80 | * @param int $duration |
||
81 | */ |
||
82 | 5 | public function setDuration($duration) |
|
83 | { |
||
84 | 5 | $this->duration = $duration; |
|
85 | 5 | } |
|
86 | |||
87 | /** |
||
88 | * @return \DateTime|null |
||
89 | */ |
||
90 | 4 | public function getLastHeartbeatAt() |
|
91 | { |
||
92 | 4 | return $this->lastHeartbeatAt; |
|
93 | } |
||
94 | |||
95 | /** |
||
96 | * @param \DateTime $lastHeartbeatAt |
||
97 | */ |
||
98 | 4 | public function setLastHeartbeatAt(\DateTime $lastHeartbeatAt) |
|
99 | { |
||
100 | 4 | $this->lastHeartbeatAt = $lastHeartbeatAt; |
|
101 | 4 | } |
|
102 | |||
103 | /** |
||
104 | * @return int |
||
105 | */ |
||
106 | 9 | public function getMaxCount() |
|
107 | { |
||
108 | 9 | return $this->maxCount; |
|
109 | } |
||
110 | |||
111 | /** |
||
112 | * @param int $maxCount |
||
113 | */ |
||
114 | 5 | public function setMaxCount($maxCount) |
|
115 | { |
||
116 | 5 | $this->maxCount = $maxCount; |
|
117 | 5 | } |
|
118 | |||
119 | /** |
||
120 | * @return int |
||
121 | */ |
||
122 | 9 | public function getProcessed() |
|
123 | { |
||
124 | 9 | return $this->processed; |
|
125 | } |
||
126 | |||
127 | /** |
||
128 | * @param int $processed |
||
129 | */ |
||
130 | 7 | public function setProcessed($processed) |
|
131 | { |
||
132 | 7 | $this->processed = $processed; |
|
133 | 7 | } |
|
134 | |||
135 | /** |
||
136 | * @return string|null |
||
137 | */ |
||
138 | 9 | public function getHostname() |
|
139 | { |
||
140 | 9 | return $this->hostname; |
|
141 | } |
||
142 | |||
143 | /** |
||
144 | * @param string $hostname |
||
145 | */ |
||
146 | 5 | public function setHostname($hostname) |
|
147 | { |
||
148 | 5 | $this->hostname = $hostname; |
|
149 | 5 | } |
|
150 | |||
151 | /** |
||
152 | * @return int|null |
||
153 | */ |
||
154 | 9 | public function getPid() |
|
155 | { |
||
156 | 9 | return $this->pid; |
|
157 | } |
||
158 | |||
159 | /** |
||
160 | * @param int $pid |
||
161 | */ |
||
162 | 5 | public function setPid($pid) |
|
163 | { |
||
164 | 5 | $this->pid = $pid; |
|
165 | 5 | } |
|
166 | |||
167 | /** |
||
168 | * @return mixed |
||
169 | */ |
||
170 | 9 | public function getElapsed() |
|
174 | |||
175 | /** |
||
176 | * @param mixed $elapsed |
||
177 | */ |
||
178 | 5 | public function setElapsed($elapsed) |
|
182 | } |
||
183 |