Fix startup of API daemon

References #79
This commit is contained in:
Joshua Boniface 2020-02-08 20:27:45 -05:00
parent 3532dcc11f
commit 4f25c55efc
2 changed files with 21 additions and 22 deletions

View File

@ -20,4 +20,4 @@
# #
############################################################################### ###############################################################################
import pvcapid.api import pvcapid.Daemon

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# api.py - PVC HTTP API interface # Daemon.py - PVC HTTP API daemon
# Part of the Parallel Virtual Cluster (PVC) system # Part of the Parallel Virtual Cluster (PVC) system
# #
# Copyright (C) 2018-2020 Joshua M. Boniface <joshua@boniface.me> # Copyright (C) 2018-2020 Joshua M. Boniface <joshua@boniface.me>
@ -5612,11 +5612,10 @@ api.add_resource(API_Provisioner_Status_Element, '/provisioner/status/<task_id>'
########################################################## ##########################################################
# Entrypoint # Entrypoint
########################################################## ##########################################################
if __name__ == '__main__': if config['debug']:
if config['debug']:
# Run in Flask standard mode # Run in Flask standard mode
app.run(config['listen_address'], config['listen_port']) app.run(config['listen_address'], config['listen_port'])
else: else:
if config['ssl_enabled']: if config['ssl_enabled']:
# Run the WSGI server with SSL # Run the WSGI server with SSL
http_server = gevent.pywsgi.WSGIServer( http_server = gevent.pywsgi.WSGIServer(