Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tothemoon
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
13
Issues
13
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
tothemoon
Commits
d7eea901
Commit
d7eea901
authored
Jun 18, 2016
by
Taddeüs Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow broken response from exchange API
parent
074cdbed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
api.py
api.py
+7
-2
No files found.
api.py
View file @
d7eea901
...
@@ -61,7 +61,7 @@ def generate_requests():
...
@@ -61,7 +61,7 @@ def generate_requests():
def
requeue_after_error
(
req
,
e
):
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
status
[
req
.
url
][
1
][
0
]
+=
0.5
queue
.
put
((
status
[
req
.
url
][
1
][
0
],
req
.
url
))
queue
.
put
((
status
[
req
.
url
][
1
][
0
],
req
.
url
))
...
@@ -129,7 +129,12 @@ if __name__ == '__main__':
...
@@ -129,7 +129,12 @@ if __name__ == '__main__':
stat
[
0
]
=
scheduled
=
time
.
time
()
+
interval
stat
[
0
]
=
scheduled
=
time
.
time
()
+
interval
queue
.
put
((
scheduled
,
res
.
request
.
url
))
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
:
for
i
in
indices
:
last
=
last
[
i
]
last
=
last
[
i
]
last
=
float
(
last
)
last
=
float
(
last
)
...
...
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