Added safety checker debug
Build, push image, and notify Watchtower / build-image (push) Successful in 39s
Build, push image, and notify Watchtower / notify (push) Successful in 10s

This commit is contained in:
2026-08-11 14:21:23 +02:00
parent f6b29c4e08
commit 1724c6a06a
+5 -1
View File
@@ -157,7 +157,7 @@ def telemetry():
return jsonify({"error": f"Database error: {str(e)}"}), 500 return jsonify({"error": f"Database error: {str(e)}"}), 500
@app.route("/debug", methods=["GET"]) @app.route("/debug/telemetryrequest", methods=["GET"])
def debug(): def debug():
# Construct external HTTP endpoint dynamically based on incoming request host # Construct external HTTP endpoint dynamically based on incoming request host
telemetry_url = f"{request.host_url.rstrip('/')}/telemetry" telemetry_url = f"{request.host_url.rstrip('/')}/telemetry"
@@ -176,6 +176,10 @@ def debug():
except Exception as e: except Exception as e:
return jsonify({"error": f"Failed to publish MQTT command: {str(e)}"}), 500 return jsonify({"error": f"Failed to publish MQTT command: {str(e)}"}), 500
@app.route("/debug", methods=["GET"])
def debug():
return safety_checker.check_dish_safety(os.path.join(CAMERA_IMAGE_DIR, "dish_0de0ee1dab8949fc8e78796947e24ed3.jpg"))
if __name__ == "__main__": if __name__ == "__main__":
app.run(debug=getattr(config, "DEBUG", True)) app.run(debug=getattr(config, "DEBUG", True))