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