| @@ 67-78 (lines=12) @@ | ||
| 64 | * @param int $ID |
|
| 65 | * @return SS_HTTPResponse |
|
| 66 | */ |
|
| 67 | protected function getFetch($ID) { |
|
| 68 | $ping = DNGitFetch::get()->byID($ID); |
|
| 69 | if(!$ping) { |
|
| 70 | return $this->message('Fetch not found', 404); |
|
| 71 | } |
|
| 72 | $output = array( |
|
| 73 | 'status' => $ping->ResqueStatus(), |
|
| 74 | 'message' => $ping->LogContent() |
|
| 75 | ); |
|
| 76 | ||
| 77 | return $this->getAPIResponse($output); |
|
| 78 | } |
|
| 79 | ||
| 80 | /** |
|
| 81 | * @return SS_HTTPResponse |
|
| @@ 133-144 (lines=12) @@ | ||
| 130 | * @param int $ID |
|
| 131 | * @return SS_HTTPResponse |
|
| 132 | */ |
|
| 133 | protected function getPing($ID) { |
|
| 134 | $ping = DNPing::get()->byID($ID); |
|
| 135 | if(!$ping) { |
|
| 136 | return $this->message('Ping not found', 404); |
|
| 137 | } |
|
| 138 | $output = array( |
|
| 139 | 'status' => $ping->ResqueStatus(), |
|
| 140 | 'message' => $ping->LogContent() |
|
| 141 | ); |
|
| 142 | ||
| 143 | return $this->getAPIResponse($output); |
|
| 144 | } |
|
| 145 | ||
| 146 | /** |
|
| 147 | * @deprecated 2.0.0 - moved to DeployDispatcher |
|
| @@ 188-199 (lines=12) @@ | ||
| 185 | * @param int $id |
|
| 186 | * @return SS_HTTPResponse |
|
| 187 | */ |
|
| 188 | protected function getDeploy($id) { |
|
| 189 | $deploy = DNDeployment::get()->byID($id); |
|
| 190 | if(!$deploy) { |
|
| 191 | return $this->message('Deploy not found', 404); |
|
| 192 | } |
|
| 193 | $output = array( |
|
| 194 | 'status' => $deploy->ResqueStatus(), |
|
| 195 | 'message' => $deploy->LogContent() |
|
| 196 | ); |
|
| 197 | ||
| 198 | return $this->getAPIResponse($output); |
|
| 199 | } |
|
| 200 | } |
|
| 201 | ||