Add Raspberry Pi health monitoring
Co-authored-by: Copilot <[email protected]>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
from flask import Flask, render_template, make_response, json, jsonify, request, send_file
|
||||
from modules import app_gps, app_events, app_car, app_account, app_gps,app_obd, app_sql, app_dash, app_upload, app_video
|
||||
from modules import app_gps, app_events, app_car, app_account, app_gps,app_obd, app_sql, app_dash, app_upload, app_video, app_health
|
||||
import os, time
|
||||
from gevent.pywsgi import WSGIServer
|
||||
|
||||
@@ -140,6 +140,10 @@ def local_video_delete():
|
||||
def upload_status():
|
||||
return jsonify(app_upload.get_status())
|
||||
|
||||
@app.route('/api/health')
|
||||
def health():
|
||||
return jsonify(app_health.collect_health())
|
||||
|
||||
@app.route('/api/upload/dashcam_toggle', methods=['POST'])
|
||||
def upload_dashcam_toggle():
|
||||
body = request.get_json(silent=True) or {}
|
||||
|
||||
Reference in New Issue
Block a user