diff --git a/app/run.py b/app/run.py index af65026..e225170 100644 --- a/app/run.py +++ b/app/run.py @@ -56,8 +56,6 @@ logger.debug('imported: %s ' % reader.__name__) template_path = os.path.abspath(os.path.join(current_path, 'templates')) processor.start(template_path) -app.wsgi_app = ProxyFix(app.wsgi_app) - logger.info("Start Stacosys application") # enable CORS @@ -68,6 +66,8 @@ if not config.DEBUG: logging.getLogger('app.cors').level = logging.WARNING logging.getLogger('werkzeug').level = logging.WARNING -app.run(host=config.HTTP_ADDRESS, - port=config.HTTP_PORT, - debug=config.DEBUG, use_reloader=False) +if __name__ == '__main__': + app.wsgi_app = ProxyFix(app.wsgi_app) + app.run(host=config.HTTP_ADDRESS, + port=config.HTTP_PORT, + debug=config.DEBUG, use_reloader=False) diff --git a/app/services/processor.py b/app/services/processor.py index 363c8d8..7bba82d 100644 --- a/app/services/processor.py +++ b/app/services/processor.py @@ -33,6 +33,7 @@ class Processor(Thread): def run(self): + logger.info('processor thread started') self.is_running = True while self.is_running: try: