Skip to content

Commit 170c56a

Browse files
committed
修改一下测试
1 parent 7257516 commit 170c56a

File tree

1 file changed

+1
-28
lines changed

1 file changed

+1
-28
lines changed

test/test_rece_delay.py

+1-28
Original file line numberDiff line numberDiff line change
@@ -13,37 +13,10 @@
1313
"""
1414

1515

16-
def _notify_dingding(content, ding_urls):
17-
if not ding_urls:
18-
return None
19-
data = {
20-
'msgtype': 'text',
21-
'text': {
22-
'content': content,
23-
},
24-
}
25-
for ding_url in ding_urls:
26-
try:
27-
start = time.time()
28-
resp = requests.post(ding_url, json=data, timeout=5)
29-
except requests.exceptions.RequestException as ex:
30-
logging.exception("push dingtalk error: %s, params: %s", ex, data)
31-
return
32-
finally:
33-
end = time.time()
34-
logging.info("push dingtalk cost: %f, params: %s", end - start, data)
35-
ret = resp.json()
36-
logging.info("push dingtalk result: %s", resp.content)
37-
if ret['errcode'] != 0:
38-
logging.error("push dingtalk failed, response: %s, params: %s", resp.content, data)
39-
40-
4116
def process(body):
4217
in_data = json.loads(body)
4318
content = in_data.get('content', '')
44-
ding_urls = in_data.get('ding_urls', ())
45-
print(content, ding_urls)
46-
# _notify_dingding(content, ding_urls)
19+
print(content)
4720

4821

4922
def main():

0 commit comments

Comments
 (0)