Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
adc2019-system
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
adc2019
adc2019-system
Commits
fe01ca25
Commit
fe01ca25
authored
Jul 26, 2019
by
Kento HASEGAWA
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable websocket
parent
6fb24587
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
main.py
main.py
+9
-9
No files found.
main.py
View file @
fe01ca25
#!python3
#!
/usr/bin/env
python3
import
argparse
from
flask
import
abort
,
Flask
,
g
,
jsonify
,
render_template
,
request
from
gevent
import
pywsgi
,
monkey
from
geventwebsocket.handler
import
WebSocketHandler
#
from gevent import pywsgi, monkey
#
from geventwebsocket.handler import WebSocketHandler
from
queue
import
Queue
import
adc2019system
...
...
@@ -81,9 +81,9 @@ def webui_api(cmd=None):
else
:
return
jsonify
(
res
)
@
webui
.
route
(
'/ws'
)
def
webui_ws
():
pass
#
@webui.route('/ws')
#
def webui_ws():
#
pass
def
init_system
(
args
):
...
...
@@ -103,7 +103,7 @@ if __name__ == "__main__":
webui
.
debug
=
True
webui
.
threaded
=
True
# webui.run(host='0.0.0.0', threaded=True
)
server
=
pywsgi
.
WSGIServer
((
""
,
args
[
'port'
]),
webui
,
handler_class
=
WebSocketHandler
)
server
.
serve_forever
()
webui
.
run
(
host
=
'0.0.0.0'
,
port
=
args
[
'port'
]
)
#
server = pywsgi.WSGIServer(("", args['port']), webui, handler_class=WebSocketHandler)
#
server.serve_forever()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment