mirror of
https://github.com/clearml/clearml
synced 2025-01-31 17:17:00 +00:00
Fix exception at exit in python 3.8+ on macOS/Windows
This commit is contained in:
parent
7a25f8afd9
commit
787079669f
@ -216,7 +216,16 @@ class BackgroundMonitor(object):
|
|||||||
current_process()._config['daemon'] = False # noqa
|
current_process()._config['daemon'] = False # noqa
|
||||||
except BaseException:
|
except BaseException:
|
||||||
pass
|
pass
|
||||||
|
# try to start the background process, if we fail retry again, or crash
|
||||||
|
for i in range(4):
|
||||||
|
try:
|
||||||
BackgroundMonitor._main_process.start()
|
BackgroundMonitor._main_process.start()
|
||||||
|
break
|
||||||
|
except BaseException:
|
||||||
|
if i < 3:
|
||||||
|
sleep(1)
|
||||||
|
continue
|
||||||
|
raise
|
||||||
if un_daemonize:
|
if un_daemonize:
|
||||||
# noinspection PyBroadException
|
# noinspection PyBroadException
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user