|
@@ 198-212 (lines=15) @@
|
| 195 |
|
|
| 196 |
|
} |
| 197 |
|
|
| 198 |
|
public function stop() { |
| 199 |
|
|
| 200 |
|
$this->logger->info("Stop signal received, trying to termminate jobs gracefully"); |
| 201 |
|
|
| 202 |
|
// $this->active = false; |
| 203 |
|
|
| 204 |
|
$this->abortQueued("Stop signal received, aborting queued jobs"); |
| 205 |
|
|
| 206 |
|
foreach ( $this->manager->running() as $uid => $job ) { |
| 207 |
|
|
| 208 |
|
$term = ProcessTools::term($job->pid, $this->lagger_timeout); |
| 209 |
|
|
| 210 |
|
} |
| 211 |
|
|
| 212 |
|
} |
| 213 |
|
|
| 214 |
|
public function kill() { |
| 215 |
|
|
|
@@ 214-228 (lines=15) @@
|
| 211 |
|
|
| 212 |
|
} |
| 213 |
|
|
| 214 |
|
public function kill() { |
| 215 |
|
|
| 216 |
|
$this->logger->info("Term signal received, termminating jobs the hard way"); |
| 217 |
|
|
| 218 |
|
// $this->active = false; |
| 219 |
|
|
| 220 |
|
$this->abortQueued("Kill signal received, aborting queued jobs"); |
| 221 |
|
|
| 222 |
|
foreach ( $this->manager->running() as $uid => $job ) { |
| 223 |
|
|
| 224 |
|
$term = ProcessTools::kill($job->pid); |
| 225 |
|
|
| 226 |
|
} |
| 227 |
|
|
| 228 |
|
} |
| 229 |
|
|
| 230 |
|
private function forker(Job $job) { |
| 231 |
|
|