MCPcopy Index your code
hub / github.com/tiny-pilot/tinypilot / update_get

Function update_get

app/api.py:318–335  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

316@api_blueprint.route('/update', methods=['GET'])
317@required_auth(auth.Role.ADMIN)
318def 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'])

Callers

nothing calls this directly

Calls 1

getMethod · 0.80

Tested by

no test coverage detected