File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed
Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -314,20 +314,17 @@ def sync_all(self, max_retry_attempts=_SYNC_ALL_NO_RETRIES):
314314 except Exception as exc : # pylint:disable=broad-except
315315 _LOGGER .error ("Exception caught when trying to sync all data: %s" , str (exc ))
316316 _LOGGER .debug ('Error: ' , exc_info = True )
317- retry_attempts = self ._retry_block (max_retry_attempts , retry_attempts )
318- if max_retry_attempts != - 1 and retry_attempts == - 1 :
319- break
317+ if max_retry_attempts != - 1 :
318+ retry_attempts += 1
319+ if retry_attempts > max_retry_attempts :
320+ break
321+ how_long = self ._backoff .get ()
322+ time .sleep (how_long )
320323 continue
321324
322325 _LOGGER .error ("Could not correctly synchronize splits and segments after %d attempts." , retry_attempts )
323326
324327 def _retry_block (self , max_retry_attempts , retry_attempts ):
325- if max_retry_attempts != - 1 :
326- retry_attempts += 1
327- if retry_attempts > max_retry_attempts :
328- return - 1
329- how_long = self ._backoff .get ()
330- time .sleep (how_long )
331328 return retry_attempts
332329
333330 def shutdown (self , blocking ):
You can’t perform that action at this time.
0 commit comments