From 004f925454148067161ab8b83c6e6ee6e07938df Mon Sep 17 00:00:00 2001 From: allegroai <> Date: Thu, 9 Apr 2020 12:47:38 +0300 Subject: [PATCH] ThreadPool should be terminated, not closed, otherwise it might hang --- trains/backend_interface/metrics/interface.py | 2 +- trains/storage/helper.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/trains/backend_interface/metrics/interface.py b/trains/backend_interface/metrics/interface.py index 9c53de7e..c99acdf0 100644 --- a/trains/backend_interface/metrics/interface.py +++ b/trains/backend_interface/metrics/interface.py @@ -10,7 +10,7 @@ from ...backend_api.services import events as api_events from ..base import InterfaceBase from ...config import config from ...debugging import get_logger -from ...storage import StorageHelper +from ...storage.helper import StorageHelper from .events import MetricsEventAdapter diff --git a/trains/storage/helper.py b/trains/storage/helper.py index ea077a79..b7ea0ff6 100644 --- a/trains/storage/helper.py +++ b/trains/storage/helper.py @@ -964,7 +964,7 @@ class StorageHelper(object): pool = StorageHelper._upload_pool StorageHelper._upload_pool = None try: - pool.close() + pool.terminate() pool.join() except: pass