Skip to content

Commit 82cd8e6

Browse files
fix: improve fallback behavior when using custom data system configuration
Co-Authored-By: mkeeler@launchdarkly.com <keelerm84@gmail.com>
1 parent e542f73 commit 82cd8e6

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

ldclient/impl/datasystem/fdv2.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -656,20 +656,12 @@ def _recovery_condition(self, status: DataSourceStatus) -> bool:
656656
:param status: Current data source status
657657
:return: True if recovery condition is met
658658
"""
659-
interrupted_at_runtime = (
660-
status.state == DataSourceState.INTERRUPTED
661-
and time.time() - status.since > 60 # 1 minute
662-
)
663659
healthy_for_too_long = (
664660
status.state == DataSourceState.VALID
665661
and time.time() - status.since > 300 # 5 minutes
666662
)
667-
cannot_initialize = (
668-
status.state == DataSourceState.INITIALIZING
669-
and time.time() - status.since > 10 # 10 seconds
670-
)
671663

672-
return interrupted_at_runtime or healthy_for_too_long or cannot_initialize
664+
return healthy_for_too_long
673665

674666
def _persistent_store_outage_recovery(self, data_store_status: DataStoreStatus):
675667
"""

0 commit comments

Comments
 (0)