Move startup code to an entrypoint function

Prevents further issues with startup.
This commit is contained in:
Joshua Boniface 2021-05-30 00:18:04 -04:00
parent 25f80a4478
commit 73407e245f
2 changed files with 27 additions and 24 deletions

View File

@ -20,3 +20,5 @@
###############################################################################
import pvcapid.Daemon # noqa: F401
pvcapid.Daemon.entrypoint()

View File

@ -107,6 +107,7 @@ except Exception as e:
# Entrypoint
##########################################################
def entrypoint():
import pvcapid.flaskapi as pvc_api # noqa: E402
if config['ssl_enabled']: