mirror of
https://github.com/clearml/clearml
synced 2025-03-03 18:52:12 +00:00
Optimize artifacts threading
This commit is contained in:
parent
a992591f3c
commit
c1cc80ba1b
@ -243,7 +243,6 @@ class Artifacts(object):
|
|||||||
self._thread = None
|
self._thread = None
|
||||||
self._flush_event = Event()
|
self._flush_event = Event()
|
||||||
self._exit_flag = False
|
self._exit_flag = False
|
||||||
self._thread_pool = ThreadPool()
|
|
||||||
self._summary = ''
|
self._summary = ''
|
||||||
self._temp_folder = []
|
self._temp_folder = []
|
||||||
self._task_artifact_list = []
|
self._task_artifact_list = []
|
||||||
@ -442,7 +441,8 @@ class Artifacts(object):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
def _start(self):
|
def _start(self):
|
||||||
if not self._thread:
|
""" Start daemon thread if any artifacts are registered and thread is not up yet """
|
||||||
|
if not self._thread and self._artifacts_dict:
|
||||||
# start the daemon thread
|
# start the daemon thread
|
||||||
self._flush_event.clear()
|
self._flush_event.clear()
|
||||||
self._thread = Thread(target=self._daemon)
|
self._thread = Thread(target=self._daemon)
|
||||||
|
Loading…
Reference in New Issue
Block a user