| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 42 | public function monitor() |
||
| 43 | { |
||
| 44 | $taskRepo = $this->doctrine->getManager() |
||
| 45 | ->getRepository('GloobyTaskBundle:QueuedTask'); |
||
| 46 | |||
| 47 | foreach ($taskRepo->findRunning() as $task) { |
||
| 48 | if (false === posix_getpgid($task->getPId())) { |
||
| 49 | $this->taskManager->failure($task, 'crashed'); |
||
| 50 | } |
||
| 51 | } |
||
| 52 | |||
| 53 | $this->doctrine->getManager()->flush(); |
||
| 54 | } |
||
| 55 | } |
||
| 56 |