Fetches the state of the latest update job. Returns: On success, a JSON data structure with the following properties: status: str describing the status of the job. Can be one of ["NOT_RUNNING", "DONE", "IN_PROGRESS"]. updateError: str of the error that oc
()
| 316 | @api_blueprint.route('/update', methods=['GET']) |
| 317 | @required_auth(auth.Role.ADMIN) |
| 318 | def update_get(): |
| 319 | """Fetches the state of the latest update job. |
| 320 | |
| 321 | Returns: |
| 322 | On success, a JSON data structure with the following properties: |
| 323 | status: str describing the status of the job. Can be one of |
| 324 | ["NOT_RUNNING", "DONE", "IN_PROGRESS"]. |
| 325 | updateError: str of the error that occurred while updating. If no error |
| 326 | occurred, then this will be null. |
| 327 | |
| 328 | Example: |
| 329 | { |
| 330 | "status": "NOT_RUNNING", |
| 331 | "updateError": null |
| 332 | } |
| 333 | """ |
| 334 | status, error = update.status.get() |
| 335 | return json_response.success({'status': str(status), 'updateError': error}) |
| 336 | |
| 337 | |
| 338 | @api_blueprint.route('/update', methods=['PUT']) |