@@ 111-131 (lines=21) @@ | ||
108 | * @param $jobName |
|
109 | * @return bool |
|
110 | */ |
|
111 | private function hasRemovedJob($jobName) |
|
112 | { |
|
113 | if ($this->isAbleToDeleteJob($jobName)) { |
|
114 | if ($this->jobRepositoryRemote->removeJob($jobName)) { |
|
115 | $this->jobIndexService->removeJob($jobName); |
|
116 | $this->logger->notice(sprintf( |
|
117 | 'Job "%s" successfully removed from chronos', |
|
118 | $jobName |
|
119 | )); |
|
120 | ||
121 | return true; |
|
122 | } |
|
123 | ||
124 | $this->logger->error(sprintf( |
|
125 | 'Failed to remove job "%s" from chronos', |
|
126 | $jobName |
|
127 | )); |
|
128 | } |
|
129 | ||
130 | return false; |
|
131 | } |
|
132 | ||
133 | /** |
|
134 | * @param string $jobName |
@@ 207-225 (lines=19) @@ | ||
204 | * @param string $appId |
|
205 | * @return bool |
|
206 | */ |
|
207 | private function removeLocalMissingAppInRemote($appId) |
|
208 | { |
|
209 | if ($this->jobIndexService->isJobInIndex($appId)) { |
|
210 | if ($this->jobRepositoryRemote->removeJob($appId)) { |
|
211 | $this->jobIndexService->removeJob($appId); |
|
212 | $this->logger->notice(sprintf( |
|
213 | 'Job "%s" successfully removed from marathon', |
|
214 | $appId |
|
215 | )); |
|
216 | ||
217 | return true; |
|
218 | } |
|
219 | $this->logger->error(sprintf( |
|
220 | 'Failed to remove"%s" from marathon', |
|
221 | $appId |
|
222 | )); |
|
223 | } |
|
224 | return false; |
|
225 | } |
|
226 | ||
227 | /** |
|
228 | * @param string $appId |