gevent concurrency / asynchronous processes

usage of gunicorn (documented)
This commit is contained in:
Josako
2024-04-30 15:50:12 +02:00
parent ffa60b4616
commit 0b7f565547
4 changed files with 13 additions and 3 deletions

7
app.py
View File

@@ -1,6 +1,11 @@
from eveai_app import create_app
from gevent.pywsgi import WSGIServer
app = create_app()
print(__name__)
if __name__ == '__main__':
app.run()
print("Server starting on port 5000")
http_server = WSGIServer(('0.0.0.0', 5000), app) # Wrap up the Flask App using Gevent
http_server.serve_forever() # Continuously listens for incoming requests