made main() a func, not sure it matters tbh, also reordered an import, but to no affect
This commit is contained in:
9
main.py
9
main.py
@@ -52,12 +52,13 @@ login_manager.login_view = "login" # default login route, failed wit
|
||||
|
||||
Compress(app)
|
||||
|
||||
|
||||
################################# Now, import separated class files ###################################
|
||||
from ai import aistats
|
||||
from files import Entry, GetJM_Message, ClearJM_Message
|
||||
from settings import Settings
|
||||
from person import Person
|
||||
from job import Job, GetNumActiveJobs
|
||||
from settings import Settings
|
||||
from user import PAUser
|
||||
|
||||
####################################### GLOBALS #######################################
|
||||
@@ -139,7 +140,11 @@ def logout():
|
||||
logout_user()
|
||||
return redirect('/login')
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
###############################################################################
|
||||
# main to be called via Flask/Gunicorn
|
||||
###############################################################################
|
||||
def main():
|
||||
if hostname == PROD_HOST:
|
||||
app.run(ssl_context=('/etc/letsencrypt/live/pa.depaoli.id.au/cert.pem', '/etc/letsencrypt/live/pa.depaoli.id.au/privkey.pem'), host="0.0.0.0", debug=False)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user