From c75de848f58cd6f684bf1b978898e1bbd90eb763 Mon Sep 17 00:00:00 2001 From: allegroai <> Date: Wed, 25 Nov 2020 14:54:42 +0200 Subject: [PATCH] Fix at_exit_called from another process should be ignored --- trains/task.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trains/task.py b/trains/task.py index 9c04515c..6a1a0a4c 100644 --- a/trains/task.py +++ b/trains/task.py @@ -2305,7 +2305,7 @@ class Task(_Task): if not self._logger: # do not recreate logger after task was closed/quit - if self._at_exit_called: + if self._at_exit_called and self._at_exit_called in (True, get_current_thread_id(), ): raise ValueError("Cannot use Task Logger after task was closed") # Get a logger object self._logger = Logger(