Ready for uwsgi
This commit is contained in:
parent
6a1dbeab90
commit
6d61e7c41f
2 changed files with 6 additions and 5 deletions
10
app/run.py
10
app/run.py
|
@ -56,8 +56,6 @@ logger.debug('imported: %s ' % reader.__name__)
|
||||||
template_path = os.path.abspath(os.path.join(current_path, 'templates'))
|
template_path = os.path.abspath(os.path.join(current_path, 'templates'))
|
||||||
processor.start(template_path)
|
processor.start(template_path)
|
||||||
|
|
||||||
app.wsgi_app = ProxyFix(app.wsgi_app)
|
|
||||||
|
|
||||||
logger.info("Start Stacosys application")
|
logger.info("Start Stacosys application")
|
||||||
|
|
||||||
# enable CORS
|
# enable CORS
|
||||||
|
@ -68,6 +66,8 @@ if not config.DEBUG:
|
||||||
logging.getLogger('app.cors').level = logging.WARNING
|
logging.getLogger('app.cors').level = logging.WARNING
|
||||||
logging.getLogger('werkzeug').level = logging.WARNING
|
logging.getLogger('werkzeug').level = logging.WARNING
|
||||||
|
|
||||||
app.run(host=config.HTTP_ADDRESS,
|
if __name__ == '__main__':
|
||||||
port=config.HTTP_PORT,
|
app.wsgi_app = ProxyFix(app.wsgi_app)
|
||||||
debug=config.DEBUG, use_reloader=False)
|
app.run(host=config.HTTP_ADDRESS,
|
||||||
|
port=config.HTTP_PORT,
|
||||||
|
debug=config.DEBUG, use_reloader=False)
|
||||||
|
|
|
@ -33,6 +33,7 @@ class Processor(Thread):
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
|
||||||
|
logger.info('processor thread started')
|
||||||
self.is_running = True
|
self.is_running = True
|
||||||
while self.is_running:
|
while self.is_running:
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Add table
Reference in a new issue