Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
platform
/
dataDocking
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 3144c98c
authored
Apr 03, 2020
by
李杨杨
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
添加超时,避免内存溢出
1 parent
f9ac98f1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
thrid_data/recvdata_py.tar.gz
thrid_data/recvdata_py/app.py
thrid_data/recvdata_py.tar.gz
View file @
3144c98
This file is too large to display.
thrid_data/recvdata_py/app.py
View file @
3144c98
...
...
@@ -636,7 +636,7 @@ def recv_data():
#交通过车
if
vehicle_url
!=
""
:
try
:
r
=
requests
.
post
(
url
=
vehicle_url
,
headers
=
headers
,
data
=
json
.
dumps
(
event_data
))
r
=
requests
.
post
(
url
=
vehicle_url
,
headers
=
headers
,
data
=
json
.
dumps
(
event_data
)
,
timeout
=
30
)
print
"send trans restult---------:"
,
r
.
status_code
,
r
.
content
status_code
=
r
.
status_code
message
=
r
.
text
...
...
@@ -668,7 +668,7 @@ def recv_data():
if
illegal_url
!=
""
:
try
:
r
=
requests
.
post
(
url
=
illegal_url
,
headers
=
headers
,
data
=
json
.
dumps
(
event_data
))
r
=
requests
.
post
(
url
=
illegal_url
,
headers
=
headers
,
data
=
json
.
dumps
(
event_data
)
,
timeout
=
30
)
print
"send illegal restult---------:"
,
r
.
status_code
status_code
=
r
.
status_code
message
=
r
.
text
...
...
@@ -721,7 +721,7 @@ def recv_data():
debug_writeFile
(
tflow_data_list
,
'tflow_data_list.txt'
)
if
t_flow_url
!=
""
:
try
:
r
=
requests
.
post
(
url
=
t_flow_url
,
headers
=
headers
,
data
=
json
.
dumps
(
tflow_data_list
,
ensure_ascii
=
False
))
r
=
requests
.
post
(
url
=
t_flow_url
,
headers
=
headers
,
data
=
json
.
dumps
(
tflow_data_list
,
ensure_ascii
=
False
)
,
timeout
=
30
)
print
"send tflow restult---------:"
,
r
.
status_code
status_code
=
r
.
status_code
message
=
r
.
text
...
...
@@ -781,7 +781,7 @@ def recv_data():
if
is_send
:
if
event_url
!=
""
:
try
:
r
=
requests
.
post
(
url
=
event_url
,
headers
=
headers
,
data
=
json
.
dumps
(
event_data
))
r
=
requests
.
post
(
url
=
event_url
,
headers
=
headers
,
data
=
json
.
dumps
(
event_data
)
,
timeout
=
30
)
print
"send event restult---------:"
,
r
.
status_code
status_code
=
r
.
status_code
message
=
r
.
text
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment