Skip to content

Commit f538ee8

Browse files
committed
fixing constant value
1 parent 9160141 commit f538ee8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

splitio/sync/synchronizer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111

1212
_LOGGER = logging.getLogger(__name__)
13-
_SYNC_ALL_NO_RETRIES = 3
13+
_SYNC_ALL_NO_RETRIES = -1
1414

1515
class SplitSynchronizers(object):
1616
"""SplitSynchronizers."""
@@ -314,7 +314,7 @@ 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-
if max_retry_attempts != -1:
317+
if max_retry_attempts != _SYNC_ALL_NO_RETRIES:
318318
retry_attempts += 1
319319
if retry_attempts > max_retry_attempts:
320320
break

tests/sync/test_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def run(x):
4646
manager = Manager(threading.Event(), synchronizer, mocker.Mock(), False, SdkMetadata('1.0', 'some', '1.2.3.4'))
4747

4848
manager._SYNC_ALL_ATTEMPTS = 1
49-
manager.start() # should not throw!
49+
manager.start(2) # should not throw!
5050

5151
def test_start_streaming_false(self, mocker):
5252
splits_ready_event = threading.Event()

0 commit comments

Comments
 (0)