mirror of
https://github.com/clearml/clearml
synced 2025-01-31 09:07:00 +00:00
Intercept SystemExit and do nothing so we could kill the thread
This commit is contained in:
parent
5ec4d80493
commit
b3c9872a3f
@ -243,6 +243,8 @@ class Task(IdObjectBase, AccessMixin, SetupUploadMixin):
|
||||
|
||||
# we do not want to wait for the check version thread,
|
||||
# because someone might wait for us to finish the repo detection update
|
||||
except SystemExit:
|
||||
pass
|
||||
except Exception as e:
|
||||
get_logger('task').debug(str(e))
|
||||
|
||||
|
@ -1212,8 +1212,6 @@ class Task(_Task):
|
||||
|
||||
:return: Logger object
|
||||
"""
|
||||
pass
|
||||
|
||||
if not self._logger:
|
||||
# force update of base logger to this current task (this is the main logger task)
|
||||
self._setup_log(replace_existing=self.is_main_task())
|
||||
@ -1456,7 +1454,7 @@ class Task(_Task):
|
||||
if self._detect_repo_async_thread.is_alive():
|
||||
self.log.info('Repository and package analysis timed out ({} sec), '
|
||||
'giving up'.format(timeout))
|
||||
# fone waiting, kill the thread
|
||||
# done waiting, kill the thread
|
||||
from .utilities.os.lowlevel import kill_thread
|
||||
kill_thread(self._detect_repo_async_thread)
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user