Skip to content

Commit 8f4041e

Browse files
committed
Enable setting thread_workers for client from env variable
1 parent 6510e9f commit 8f4041e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

botanalytics/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def __init__(self, debug=None, api_key=None, base_url=None, channel=None,
127127
self.debug = bool(util.strtobool(os.getenv('BA_DEBUG'))) if debug is None else debug
128128
self.is_async = bool(util.strtobool(os.getenv('BA_IS_ASYNC'))) if is_async is None else is_async
129129
self.channel = channel
130-
self.thread_workers = thread_workers
130+
self.thread_workers = int(os.getenv('BA_THREAD_WORKERS')) if thread_workers is None else int(thread_workers)
131131
self.api_key = os.getenv('BA_API_KEY') if api_key is None else api_key
132132
self.base_url = (default_base_url if os.getenv('BA_BASE_URL') is None else os.getenv('BA_BASE_URL')) \
133133
if base_url is None else base_url

0 commit comments

Comments
 (0)