Skip to content

Commit b205740

Browse files
committed
feat: add further details if job report commit does not work
1 parent 7e6ff06 commit b205740

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/DIRAC/WorkloadManagementSystem/Client/JobReport.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,16 +115,20 @@ def sendStoredJobParameters(self):
115115

116116
def commit(self):
117117
"""Send all the accumulated information"""
118+
messages = []
118119

119-
success = True
120120
result = self.sendStoredStatusInfo()
121-
success &= result["OK"]
121+
if not result["OK"]:
122+
messages.append(result["Message"])
122123
result = self.sendStoredJobParameters()
123-
success &= result["OK"]
124+
if not result["OK"]:
125+
messages.append(result["Message"])
124126

125-
if success:
126-
return S_OK()
127-
return S_ERROR("Information upload to JobStateUpdate service failed")
127+
if messages:
128+
gLogger.warn("Some information could not be uploaded to JobStateUpdate service:", "; ".join(messages))
129+
return S_ERROR("Information upload to JobStateUpdate service failed")
130+
131+
return S_OK()
128132

129133
def dump(self):
130134
"""Print out the contents of the internal cached information"""

0 commit comments

Comments
 (0)