Skip to content

Commit c3a13b6

Browse files
committed
test
1 parent 661efed commit c3a13b6

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

src/DIRAC/WorkloadManagementSystem/FutureClient/JobStateUpdateClient.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,22 @@ def setJobAttribute(self, jobID: str | int, attribute: str, value: str):
8686
@stripValueIfOK
8787
@convertToReturnValue
8888
def setJobParameter(self, jobID: str | int, name: str, value: str):
89-
with DiracXClient() as api:
90-
api.jobs.patch_metadata({jobID: {name: value}})
89+
try:
90+
with DiracXClient() as api:
91+
api.jobs.patch_metadata({jobID: {name: value}})
92+
except Exception as e:
93+
print(f"Exception when setting job parameter: {e} - Parameters were: {name}={value}")
94+
raise
9195

9296
@stripValueIfOK
9397
@convertToReturnValue
9498
def setJobParameters(self, jobID: str | int, parameters: list):
95-
with DiracXClient() as api:
96-
api.jobs.patch_metadata({jobID: {k: v for k, v in parameters}})
99+
try:
100+
with DiracXClient() as api:
101+
api.jobs.patch_metadata({jobID: {k: v for k, v in parameters}})
102+
except Exception as e:
103+
print(f"Exception when setting job parameters: {e} - Parameters were: {parameters}")
104+
raise
97105

98106
@stripValueIfOK
99107
@convertToReturnValue

0 commit comments

Comments
 (0)