From 3ce0a9b47ecf0941a0fcb24396d7425937815ce7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eddy=20=E2=88=86?= Date: Sun, 9 Apr 2023 16:47:58 +0100 Subject: [PATCH] #89 experimental ThreadPoolExecutor de-activation --- src/target_s3_json/s3.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/target_s3_json/s3.py b/src/target_s3_json/s3.py index 03946c9..423d33f 100644 --- a/src/target_s3_json/s3.py +++ b/src/target_s3_json/s3.py @@ -158,7 +158,7 @@ def upload_file(config: Dict[str, Any], file_metadata: Dict) -> None: async def upload_thread(config: Dict[str, Any], file_metadata: Dict) -> Future: return await to_thread( - config['executor'].submit, + *([config['executor'].submit] if config.get('thread_pool', True) else []), upload_file, config, file_metadata)