Skip to content

Commit 7e93406

Browse files
committed
fix: JobReport cannot commit job params from the JobWrapper
1 parent 1c1939c commit 7e93406

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

src/DIRAC/Resources/Computing/ComputingElement.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
getNumberOfProcessors,
5353
)
5454

55-
INTEGER_PARAMETERS = ["CPUTime", "NumberOfProcessors", "NumberOfPayloadProcessors", "MaxRAM"]
55+
INTEGER_PARAMETERS = ["CPUTime", "CPUNormalizationFactor", "NumberOfProcessors", "NumberOfPayloadProcessors", "MaxRAM"]
5656
FLOAT_PARAMETERS = ["WaitingToRunningRatio"]
5757
LIST_PARAMETERS = ["Tag", "RequiredTag"]
5858
WAITING_TO_RUNNING_RATIO = 0.5

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)