Commit 3144c98c by 李杨杨

添加超时,避免内存溢出

1 parent f9ac98f1
This file is too large to display.
......@@ -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
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!