Merge branch 'optimised-capture-threadpools' into 'master'

Optimised capture IO

See merge request openflexure/openflexure-microscope-server!62
This commit is contained in:
Joel Collins 2020-06-15 16:28:25 +00:00
commit aa9f621476
12 changed files with 220 additions and 175 deletions

View file

@ -3,13 +3,20 @@ from gevent import monkey
monkey.patch_all()
import sys
import time
import atexit
import logging, logging.handlers
# Look for debug flag
if "-d" in sys.argv or "--debug" in sys.argv:
log_level = logging.DEBUG
else:
log_level = logging.INFO
# Set root logger level
logger = logging.getLogger()
logger.setLevel(logging.INFO)
logger.setLevel(log_level)
import os
import pkg_resources

View file

@ -25,7 +25,7 @@ class MjpegStream(PropertyView):
frame from the camera object, passed to the Flask response, and then repeats until
the connection is closed.
Without monkey patching with gevent, or using a native threaded server, the stream
Without monkey patching, or using a native threaded server, the stream
will block all proceeding requests.
"""
microscope = find_component("org.openflexure.microscope")