Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
evm-store
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wanli
evm-store
Commits
b1082fdb
Commit
b1082fdb
authored
Aug 02, 2021
by
wanliofficial
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix(框架集成monitor,数据库文件增加sort字段):
parent
4e0be554
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
791 additions
and
45 deletions
+791
-45
tools/build_out/hao.360.cn.json
tools/build_out/hao.360.cn.json
+773
-27
tools/build_out/manager.py
tools/build_out/manager.py
+17
-18
tools/build_out/views/monitor.py
tools/build_out/views/monitor.py
+1
-0
No files found.
tools/build_out/hao.360.cn.json
View file @
b1082fdb
This diff is collapsed.
Click to expand it.
tools/build_out/manager.py
View file @
b1082fdb
'''
Author: your name
Date: 2021-07-15 09:33:39
LastEditTime: 2021-07-28 19:56:22
LastEditors: your name
Description: In User Settings Edit
FilePath:
\
evm-store
\t
ools
\b
uild_out
\
manager.py
'''
'''
Author: your name
Date: 2021-06-15 17:40:09
LastEditTime: 2021-06-30 18:09:51
LastEditors: Please set LastEditors
Description: In User Settings Edit
FilePath:
\
evm-store
\t
ools
\r
esources
\
manager.py
'''
# -*- coding: utf-8 -*-
from
tornado.wsgi
import
WSGIContainer
from
tornado.httpserver
import
HTTPServer
from
tornado.web
import
Application
,
RequestHandler
,
FallbackHandler
from
tornado.ioloop
import
IOLoop
from
flask_script
import
Manager
from
flask_migrate
import
Migrate
from
application.app
import
create_app
,
db
from
application.config
import
config
from
views.monitor
import
DeviceMessageHandler
,
WatchHandler
,
NotifyHandler
# 根据配置初始化app
app
=
create_app
(
config
)
...
...
@@ -38,7 +24,6 @@ def run():
To use: python3 manager.py run
"""
# app.logger.setLevel(app.config.get('LOG_LEVEL', logging.INFO))
http_server
=
HTTPServer
(
WSGIContainer
(
app
))
http_server
.
listen
(
int
(
port
),
address
=
host
)
IOLoop
.
instance
()
.
start
()
...
...
@@ -49,8 +34,22 @@ def debug():
debug模式启动命令函数
To use: python3 manager.py debug
"""
wsgi_app
=
WSGIContainer
(
app
)
application
=
Application
([
(
r"/api/v1/evm_store/monitor"
,
DeviceMessageHandler
),
(
r"/api/v1/evm_store/watch"
,
WatchHandler
),
(
r"/ws/v1/notify"
,
NotifyHandler
),
(
r'.*'
,
FallbackHandler
,
dict
(
fallback
=
wsgi_app
))
])
application
.
listen
(
int
(
port
),
address
=
host
)
IOLoop
.
current
()
.
start
()
print
(
"WebSocket Service Started......"
)
# app.logger.setLevel(logging.DEBUG)
app
.
run
(
debug
=
True
,
port
=
int
(
port
),
host
=
host
)
#
app.run(debug=True, port=int(port), host=host)
if
__name__
==
'__main__'
:
manager
.
run
()
tools/build_out/views/monitor.py
View file @
b1082fdb
...
...
@@ -354,3 +354,4 @@ if __name__ == "__main__":
signal
.
signal
(
signal
.
SIGTERM
,
raise_graceful_exit
)
tornado
.
ioloop
.
IOLoop
.
current
()
.
start
()
print
(
"WebSocket Service Started......"
)
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