Maket it work under gunicorn
This commit is contained in:
parent
0c4b224605
commit
697483f240
@ -1,5 +1,6 @@
|
|||||||
#!/bin/env python3
|
#!/bin/env python3
|
||||||
from flask import Flask, request, jsonify
|
from flask import Flask, request, jsonify
|
||||||
|
from flask_socketio import SocketIO
|
||||||
import websocket
|
import websocket
|
||||||
import json
|
import json
|
||||||
import yaml
|
import yaml
|
||||||
@ -9,6 +10,7 @@ __version__ = "2.0.0b1"
|
|||||||
versionstring='Taurix TellMe server v' + __version__
|
versionstring='Taurix TellMe server v' + __version__
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
socketio = SocketIO(app, async_mode='gevent')
|
||||||
|
|
||||||
hooks = {}
|
hooks = {}
|
||||||
with open(r'/etc/tellme/hooks.yml') as hooksfile:
|
with open(r'/etc/tellme/hooks.yml') as hooksfile:
|
||||||
@ -59,4 +61,4 @@ if __name__ == '__main__':
|
|||||||
print("Started %s" % (versionstring))
|
print("Started %s" % (versionstring))
|
||||||
uri = "ws://localhost:5080"
|
uri = "ws://localhost:5080"
|
||||||
ws = websocket.create_connection(uri)
|
ws = websocket.create_connection(uri)
|
||||||
app.run(debug=True)
|
socketio.run(app, host="0.0.0.0", port=8080)
|
||||||
|
Loading…
Reference in New Issue
Block a user