Commit f67809c7 by 陈森彬

update

parent f4f041ea
Showing with 1 additions and 1 deletions
...@@ -126,7 +126,7 @@ def get_task_error_rate(time_range=30, error_rate=30): ...@@ -126,7 +126,7 @@ def get_task_error_rate(time_range=30, error_rate=30):
res = requests.post(url, json=query) res = requests.post(url, json=query)
# value = response['aggregations']['avgFailRate']['value'] # value = response['aggregations']['avgFailRate']['value']
buckets = res.json()['aggregations']['avgFailRate']['value'] if res.status_code == 200 and res.json()['aggregations']['taskCodes']['buckets'] else "" buckets = res.json()['aggregations']['taskCodes']['buckets'] if res.status_code == 200 and res.json()['aggregations']['taskCodes']['buckets'] else ""
if buckets: if buckets:
return gen_msg(time_range, buckets) return gen_msg(time_range, buckets)
return return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment