From c6570143885ac5eba85cd8370101b8149ba5fb86 Mon Sep 17 00:00:00 2001 From: Joel Collins Date: Sun, 15 Mar 2020 17:06:26 +0000 Subject: [PATCH] Run gevent monkeypatch --- openflexure_microscope/api/app.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/openflexure_microscope/api/app.py b/openflexure_microscope/api/app.py index ef8301b1..efb53919 100644 --- a/openflexure_microscope/api/app.py +++ b/openflexure_microscope/api/app.py @@ -1,4 +1,8 @@ #!/usr/bin/env python +from gevent import monkey + +# Patch most system modules. Leave threads untouched so we can still use them normally if needed. +monkey.patch_all(thread=False) import time import atexit @@ -175,4 +179,4 @@ if __name__ == "__main__": from labthings.server.wsgi import Server server = Server(app) - server.run(host="0.0.0.0", port=5000, debug=True) + server.run(host="0.0.0.0", port=5000, debug=False)