Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/DIRAC/MonitoringSystem/Client/MonitoringReporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ def commit(self):
self.__documents = []
self.__documentLock.release()
recordSent = 0
try_count = 0
try:
while documents:
recordsToSend = documents[: self.__maxRecordsInABundle]
Expand All @@ -150,8 +151,13 @@ def commit(self):
# if we managed to publish the records we can delete from the list
recordSent += len(recordsToSend)
del documents[: self.__maxRecordsInABundle]
try_count = 0
else:
gLogger.warn("Failed to insert the records:", retVal["Message"])
try_count += 1
if try_count == 10:
gLogger.error("Failed to insert Monitoring records after 10 attempts")
break
Comment thread
atsareg marked this conversation as resolved.
except Exception as e: # pylint: disable=broad-except
gLogger.exception("Error committing", lException=e)
return S_ERROR(f"Error committing {repr(e).replace(',)',')')}")
Expand Down
Loading