| @@ 110-132 (lines=23) @@ | ||
| 107 | * @param $sJobName |
|
| 108 | * @return bool |
|
| 109 | */ |
|
| 110 | private function hasRemovedJob($sJobName) |
|
| 111 | { |
|
| 112 | if ($this->isAbleToDeleteJob($sJobName)) |
|
| 113 | { |
|
| 114 | if ($this->oJobRepositoryRemote->removeJob($sJobName)) |
|
| 115 | { |
|
| 116 | $this->oJobIndexService->removeJob($sJobName); |
|
| 117 | $this->oLogger->notice(sprintf( |
|
| 118 | 'Job "%s" successfully removed from chronos', |
|
| 119 | $sJobName |
|
| 120 | )); |
|
| 121 | ||
| 122 | return true; |
|
| 123 | } |
|
| 124 | ||
| 125 | $this->oLogger->error(sprintf( |
|
| 126 | 'Failed to remove job "%s" from chronos', |
|
| 127 | $sJobName |
|
| 128 | )); |
|
| 129 | } |
|
| 130 | ||
| 131 | return false; |
|
| 132 | } |
|
| 133 | ||
| 134 | /** |
|
| 135 | * @param string $sJobName |
|
| @@ 198-219 (lines=22) @@ | ||
| 195 | } |
|
| 196 | ||
| 197 | ||
| 198 | private function removeLocalMissingAppInRemote($sAppId) |
|
| 199 | { |
|
| 200 | if ($this->oJobIndexService->isJobInIndex($sAppId)) |
|
| 201 | { |
|
| 202 | if ($this->oJobRepositoryRemote->removeJob($sAppId)) |
|
| 203 | { |
|
| 204 | $this->oJobIndexService->removeJob($sAppId); |
|
| 205 | $this->oLogger->notice(sprintf( |
|
| 206 | 'Job "%s" successfully removed from marathon', |
|
| 207 | $sAppId |
|
| 208 | )); |
|
| 209 | ||
| 210 | return true; |
|
| 211 | } |
|
| 212 | $this->oLogger->error(sprintf( |
|
| 213 | 'Failed to remove"%s" from marathon', |
|
| 214 | $sAppId |
|
| 215 | )); |
|
| 216 | ||
| 217 | } |
|
| 218 | return false; |
|
| 219 | } |
|
| 220 | ||
| 221 | private function updateAppInRemote($sAppId) |
|
| 222 | { |
|