mirror of
https://github.com/clearml/clearml
synced 2025-01-31 17:17:00 +00:00
Make sure Task.close() will wait for repository package analysis (timeout 5 minutes)
This commit is contained in:
parent
91bc4b92cd
commit
03bf764dc7
@ -1034,8 +1034,16 @@ class Task(_Task):
|
||||
.. warning::
|
||||
Only call :meth:`Task.close` if you are certain the Task is not needed.
|
||||
"""
|
||||
if self._at_exit_called:
|
||||
return
|
||||
|
||||
# store is main before we call at_exit, because will will Null it
|
||||
is_main = self.is_main_task()
|
||||
|
||||
# wait for repository detection (5 minutes should be reasonable time to detect all packages)
|
||||
if self._logger and not self.__is_subprocess():
|
||||
self._wait_for_repo_detection(timeout=300.)
|
||||
|
||||
self.__shutdown()
|
||||
# unregister atexit callbacks and signal hooks, if we are the main task
|
||||
if is_main:
|
||||
|
Loading…
Reference in New Issue
Block a user