Skip to content

Commit ea257f8

Browse files
MichaelGHSegclaude
andcommitted
Consolidate backoff parameters: max retries 1000 -> 10
Align retry configuration with cross-library defaults. Base backoff (500ms) and max backoff (60s) already matched. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ec0481f commit ea257f8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

segment/analytics/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class DefaultConfig(object):
3030
max_queue_size = 10000
3131
gzip = False
3232
timeout = 15
33-
max_retries = 1000
33+
max_retries = 10
3434
max_total_backoff_duration = 43200
3535
max_rate_limit_duration = 43200
3636
proxies = None

segment/analytics/consumer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class Consumer(Thread):
3333
log = logging.getLogger('segment')
3434

3535
def __init__(self, queue, write_key, upload_size=100, host=None,
36-
on_error=None, upload_interval=0.5, gzip=False, retries=1000,
36+
on_error=None, upload_interval=0.5, gzip=False, retries=10,
3737
timeout=15, proxies=None, oauth_manager=None,
3838
max_total_backoff_duration=DEFAULT_MAX_TOTAL_BACKOFF_DURATION,
3939
max_rate_limit_duration=DEFAULT_MAX_RATE_LIMIT_DURATION):

0 commit comments

Comments
 (0)