mirror of
https://github.com/clearml/clearml
synced 2025-06-26 18:16:07 +00:00
Fix crash when calling task.flush(wait_for_uploads=True)
while executing remotely
This commit is contained in:
parent
8992275f8e
commit
bc94a55525
@ -108,7 +108,12 @@ class BackgroundReportService(BackgroundMonitor, AsyncManagerMixin):
|
||||
if isinstance(self._empty_state_event, ForkEvent):
|
||||
self._flush_event.set()
|
||||
tic = time()
|
||||
while self._thread and self._thread.is_alive() and (not timeout or time()-tic < timeout):
|
||||
|
||||
while (
|
||||
self._thread
|
||||
and (self._thread is True or self._thread.is_alive())
|
||||
and (not timeout or time() - tic < timeout)
|
||||
):
|
||||
if self._empty_state_event.wait(timeout=1.0):
|
||||
break
|
||||
if self._event.wait(0) or self._done_ev.wait(0):
|
||||
|
Loading…
Reference in New Issue
Block a user