| @@ 119-137 (lines=19) @@ | ||
| 116 |         { | 
                                |
| 117 | $_oJobEntityLocal = $this->oJobRepositoryLocal->getJob($_oJobEntity->name);  | 
                                |
| 118 | // new job  | 
                                |
| 119 | if (empty($_oJobEntityLocal->name))  | 
                                |
| 120 |             { | 
                                |
| 121 | if ($this->oJobRepositoryLocal->addJob($_oJobEntity))  | 
                                |
| 122 |                 { | 
                                |
| 123 | $this->oLogger->notice(sprintf(  | 
                                |
| 124 | 'Job "%s" successfully stored in local repository',  | 
                                |
| 125 | $_oJobEntity->name  | 
                                |
| 126 | ));  | 
                                |
| 127 | }  | 
                                |
| 128 | else  | 
                                |
| 129 |                 { | 
                                |
| 130 | $this->oLogger->error(sprintf(  | 
                                |
| 131 | 'Failed to store job "%s" in local repository',  | 
                                |
| 132 | $_oJobEntity->name  | 
                                |
| 133 | ));  | 
                                |
| 134 | }  | 
                                |
| 135 | ||
| 136 | continue;  | 
                                |
| 137 | }  | 
                                |
| 138 | ||
| 139 | // update job  | 
                                |
| 140 | $_aDiff = $this->oJobComparisonBusinessCase->getJobDiff($_oJobEntity->name);  | 
                                |
| @@ 153-166 (lines=14) @@ | ||
| 150 | );  | 
                                |
| 151 | }  | 
                                |
| 152 | ||
| 153 | if ($this->oJobRepositoryLocal->updateJob($_oJobEntity))  | 
                                |
| 154 |                 { | 
                                |
| 155 | $this->oLogger->notice(sprintf(  | 
                                |
| 156 | 'Job "%s" successfully updated in local repository',  | 
                                |
| 157 | $_oJobEntity->name  | 
                                |
| 158 | ));  | 
                                |
| 159 | }  | 
                                |
| 160 | else  | 
                                |
| 161 |                 { | 
                                |
| 162 | $this->oLogger->error(sprintf(  | 
                                |
| 163 | 'Failed to update job "%s" in local repository',  | 
                                |
| 164 | $_oJobEntity->name  | 
                                |
| 165 | ));  | 
                                |
| 166 | }  | 
                                |
| 167 | ||
| 168 | // remove job from index in case off added in the past  | 
                                |
| 169 | $this->oJobIndexService->removeJob($_oJobEntity->name);  | 
                                |