Added a basic 200 response to the root / URL for health check integrations (e.g. docker-compose)

This commit is contained in:
ivelin 2019-08-22 12:03:10 -05:00
parent 9803c8ee59
commit 8e98f8e9c0

5
detect_objects.py Normal file → Executable file
View File

@ -81,6 +81,11 @@ def main():
return Response(imagestream(camera_name),
mimetype='multipart/x-mixed-replace; boundary=frame')
@app.route('/')
def ishealthy():
# return a healh
return "Frigate is running. Alive and healthy!"
def imagestream(camera_name):
while True:
# max out at 5 FPS