@@ 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 |
@@ 228-249 (lines=22) @@ | ||
225 | * @param string $sAppId |
|
226 | * @return bool |
|
227 | */ |
|
228 | private function removeLocalMissingAppInRemote($sAppId) |
|
229 | { |
|
230 | if ($this->oJobIndexService->isJobInIndex($sAppId)) |
|
231 | { |
|
232 | if ($this->oJobRepositoryRemote->removeJob($sAppId)) |
|
233 | { |
|
234 | $this->oJobIndexService->removeJob($sAppId); |
|
235 | $this->oLogger->notice(sprintf( |
|
236 | 'Job "%s" successfully removed from marathon', |
|
237 | $sAppId |
|
238 | )); |
|
239 | ||
240 | return true; |
|
241 | } |
|
242 | $this->oLogger->error(sprintf( |
|
243 | 'Failed to remove"%s" from marathon', |
|
244 | $sAppId |
|
245 | )); |
|
246 | ||
247 | } |
|
248 | return false; |
|
249 | } |
|
250 | ||
251 | /** |
|
252 | * @param string $sAppId |