Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tothemoon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Taddeüs Kroes
tothemoon
Commits
d7eea901
Commit
d7eea901
authored
8 years ago
by
Taddeüs Kroes
Browse files
Options
Downloads
Patches
Plain Diff
Allow broken response from exchange API
parent
074cdbed
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
api.py
+7
-2
7 additions, 2 deletions
api.py
with
7 additions
and
2 deletions
api.py
+
7
−
2
View file @
d7eea901
...
...
@@ -61,7 +61,7 @@ def generate_requests():
def
requeue_after_error
(
req
,
e
):
print
>>
sys
.
stderr
,
'
Error
for %s:
'
%
req
.
url
,
e
.
message
print
>>
sys
.
stderr
,
'
Error
:
'
,
e
.
message
status
[
req
.
url
][
1
][
0
]
+=
0.5
queue
.
put
((
status
[
req
.
url
][
1
][
0
],
req
.
url
))
...
...
@@ -129,7 +129,12 @@ if __name__ == '__main__':
stat
[
0
]
=
scheduled
=
time
.
time
()
+
interval
queue
.
put
((
scheduled
,
res
.
request
.
url
))
last
=
res
.
json
()
try
:
last
=
res
.
json
()
except
ValueError
as
e
:
print
>>
sys
.
stderr
,
'
invalid response from %s:
'
%
exid
,
e
.
message
continue
for
i
in
indices
:
last
=
last
[
i
]
last
=
float
(
last
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment