@@ -106,18 +106,7 @@ def getJobParameters(self, jobID, paramList=None):
106
106
Returns a dictionary with the Job Parameters.
107
107
If parameterList is empty - all the parameters are returned.
108
108
"""
109
-
110
- if isinstance (jobID , (str , int )):
111
- jobID = [jobID ]
112
-
113
- jobIDList = []
114
- for jID in jobID :
115
- ret = self ._escapeString (str (jID ))
116
- if not ret ["OK" ]:
117
- return ret
118
- jobIDList .append (ret ["Value" ])
119
-
120
- # self.log.debug('JobDB.getParameters: Getting Parameters for jobs %s' % ','.join(jobIDList))
109
+ jobIDList = [jobID ] if isinstance (jobID , (str , int )) else jobID
121
110
122
111
resultDict = {}
123
112
if paramList :
@@ -130,7 +119,7 @@ def getJobParameters(self, jobID, paramList=None):
130
119
return ret
131
120
paramNameList .append (ret ["Value" ])
132
121
cmd = "SELECT JobID, Name, Value FROM JobParameters WHERE JobID IN ({}) AND Name IN ({})" .format (
133
- "," .join (jobIDList ),
122
+ "," .join (str ( int ( j )) for j in jobIDList ),
134
123
"," .join (paramNameList ),
135
124
)
136
125
result = self ._query (cmd )
@@ -560,7 +549,7 @@ def setJobAttributes(self, jobID, attrNames, attrValues, update=False, myDate=No
560
549
if not attr :
561
550
return S_ERROR ("JobDB.setAttributes: Nothing to do" )
562
551
563
- cmd = f"UPDATE Jobs SET { ', ' .join (attr )} WHERE JobID in ( { ', ' .join (jIDList )} )"
552
+ cmd = f"UPDATE Jobs SET { ', ' .join (attr )} WHERE JobID in ( { ', ' .join (str ( int ( j )) for j in jIDList )} )"
564
553
565
554
if myDate :
566
555
cmd += f" AND LastUpdateTime < { myDate } "
0 commit comments