mirror of
https://github.com/clearml/clearml
synced 2025-02-07 21:33:25 +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,
|
# we do not want to wait for the check version thread,
|
||||||
# because someone might wait for us to finish the repo detection update
|
# because someone might wait for us to finish the repo detection update
|
||||||
|
except SystemExit:
|
||||||
|
pass
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
get_logger('task').debug(str(e))
|
get_logger('task').debug(str(e))
|
||||||
|
|
||||||
|
@ -1212,8 +1212,6 @@ class Task(_Task):
|
|||||||
|
|
||||||
:return: Logger object
|
:return: Logger object
|
||||||
"""
|
"""
|
||||||
pass
|
|
||||||
|
|
||||||
if not self._logger:
|
if not self._logger:
|
||||||
# force update of base logger to this current task (this is the main logger task)
|
# force update of base logger to this current task (this is the main logger task)
|
||||||
self._setup_log(replace_existing=self.is_main_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():
|
if self._detect_repo_async_thread.is_alive():
|
||||||
self.log.info('Repository and package analysis timed out ({} sec), '
|
self.log.info('Repository and package analysis timed out ({} sec), '
|
||||||
'giving up'.format(timeout))
|
'giving up'.format(timeout))
|
||||||
# fone waiting, kill the thread
|
# done waiting, kill the thread
|
||||||
from .utilities.os.lowlevel import kill_thread
|
from .utilities.os.lowlevel import kill_thread
|
||||||
kill_thread(self._detect_repo_async_thread)
|
kill_thread(self._detect_repo_async_thread)
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user