Skip to content

Commit

Permalink
Add More Retries to 400 on Query
Browse files Browse the repository at this point in the history
  • Loading branch information
Bill Prin committed Sep 23, 2016
1 parent af4f346 commit e0da2ea
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions system_tests/monitoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,14 @@ def test_write_point(self):
retry_500(client.write_point)(metric, resource, VALUE)

def _query_timeseries_with_retries():
MAX_RETRIES = 7

def _has_timeseries(result):
return len(list(result)) > 0
retry_result = RetryResult(_has_timeseries, max_tries=7)(
client.query)
return RetryErrors(BadRequest)(retry_result)

retry_result = RetryResult(_has_timeseries,
max_tries=MAX_RETRIES)(client.query)
return RetryErrors(BadRequest, max_tries=MAX_RETRIES)(retry_result)

query = _query_timeseries_with_retries()(METRIC_TYPE, minutes=5)
timeseries_list = list(query)
Expand Down

0 comments on commit e0da2ea

Please sign in to comment.