Skip to content

Commit

Permalink
unify returned result
Browse files Browse the repository at this point in the history
  • Loading branch information
fstagni committed Apr 14, 2021
1 parent 59c21aa commit 1a0b0ee
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -373,16 +373,15 @@ def export_setJobParameters(cls, jobID, parameters):
for job specified by its JobId
"""
if cls.elasticJobParametersDB:
res = cls.elasticJobParametersDB.setJobParameters(jobID, parameters)
if not res['OK']:
gLogger.error('Failed to add Job Parameters to ElasticJobParametersDB', res['Message'])

result = cls.elasticJobParametersDB.setJobParameters(jobID, parameters)
if not result['OK']:
gLogger.error('Failed to add Job Parameters to ElasticJobParametersDB', result['Message'])
else:
result = cls.jobDB.setJobParameters(int(jobID), parameters)
if not result['OK']:
gLogger.error('Failed to add Job Parameters to MySQL', result['Message'])

return res
return result

###########################################################################
types_sendHeartBeat = [[six.string_types, int], dict, dict]
Expand Down

0 comments on commit 1a0b0ee

Please sign in to comment.