Skip to content

Commit f384490

Browse files
authored
Merge pull request #91 from vctqs1/master
chore: able to config timeout/retry/health_check number via environment
2 parents dcc68de + 2912a8f commit f384490

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

scraper/src/typesense_helper.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ def __init__(self, alias_name, collection_name_tmp, custom_settings):
2424
'protocol': os.environ.get('TYPESENSE_PROTOCOL', None),
2525
}
2626
],
27-
'connection_timeout_seconds': 30 * 60,
27+
'connection_timeout_seconds': int(os.environ.get('TYPESENSE_CONNECTION_TIMEOUT_SECONDS', 30 * 60)),
28+
'retry_interval_seconds': int(os.environ.get('TYPESENSE_RETRY_INTERVAL_SECONDS', 1)),
29+
'num_retries': int(os.environ.get('TYPESENSE_NUM_RETRIES', 3)),
30+
'healthcheck_interval_seconds': int(os.environ.get('TYPESENSE_HEALTHCHECK_INTERVAL_SECONDS', 60)),
2831
'verify': os.environ.get('TYPESENSE_VERIFY', 'True').lower() == 'true',
2932
}
3033
)

0 commit comments

Comments
 (0)