Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
lichenggang
/
tas_monitor
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
5f5fab00
authored
Apr 09, 2022
by
陈森彬
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
update
parent
63fb0308
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
crawler_process.py
crawler_process.py
View file @
5f5fab00
...
...
@@ -67,8 +67,9 @@ def get_error_ratio(task_code, time_range=30):
res
=
requests
.
post
(
url
,
json
=
query
)
# value = response['aggregations']['avgFailRate']['value']
value
=
res
.
json
()[
'aggregations'
][
'avgFailRate'
][
'value'
]
if
res
.
status_code
==
200
else
0.0
print
(
task_code
,
value
)
print
(
task_code
)
value
=
res
.
json
()[
'aggregations'
][
'avgFailRate'
][
'value'
]
if
res
.
status_code
==
200
and
res
.
json
()[
'aggregations'
][
'avgFailRate'
][
'value'
]
else
0.0
print
(
value
)
print
(
res
.
json
())
return
round
(
value
,
3
)
...
...
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