mirror of
https://github.com/clearml/clearml
synced 2025-03-03 18:52:12 +00:00
Retry sending console logs if session.send() fails (applicable only in local mode where we use the logging handler)
This commit is contained in:
parent
cf850020fb
commit
8ee2bd1844
@ -128,5 +128,7 @@ class TaskHandler(BufferingHandler):
|
||||
res = self.session.send(a_request)
|
||||
if not res.ok():
|
||||
print("Failed logging task to backend ({:d} lines, {})".format(len(a_request.requests), str(res.meta)))
|
||||
except Exception:
|
||||
print("Failed logging task to backend ({:d} lines)".format(len(a_request.requests)))
|
||||
except Exception as ex:
|
||||
print("Retrying, failed logging task to backend ({:d} lines): {}".format(len(a_request.requests), ex))
|
||||
# we should push ourselves back into the thread pool
|
||||
self._thread_pool.apply_async(self._send_events, args=(a_request, ))
|
||||
|
Loading…
Reference in New Issue
Block a user