Skip to content

Commit

Permalink
fix: JobState does not need to push JobParameters
Browse files Browse the repository at this point in the history
  • Loading branch information
fstagni committed Jun 28, 2024
1 parent 95bbc20 commit b42df9b
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/DIRAC/WorkloadManagementSystem/Client/JobState/JobState.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from DIRAC.WorkloadManagementSystem.Client.JobState.JobManifest import JobManifest
from DIRAC.WorkloadManagementSystem.DB.JobDB import JobDB
from DIRAC.WorkloadManagementSystem.DB.JobLoggingDB import JobLoggingDB
from DIRAC.WorkloadManagementSystem.DB.JobParametersDB import JobParametersDB
from DIRAC.WorkloadManagementSystem.DB.TaskQueueDB import TaskQueueDB, multiValueDefFields, singleValueDefFields
from DIRAC.WorkloadManagementSystem.Service.JobPolicy import (
RIGHT_CHANGE_STATUS,
Expand All @@ -26,7 +25,6 @@ def reset(self):
self.jobDB = None
self.logDB = None
self.tqDB = None
self.jobParametersDB = None

__db = DBHold()

Expand All @@ -38,7 +36,6 @@ def checkDBAccess(cls):
JobState.__db.jobDB = JobDB()
JobState.__db.logDB = JobLoggingDB()
JobState.__db.tqDB = TaskQueueDB()
JobState.__db.jpDB = JobParametersDB()

def __init__(self, jid):
self.__jid = jid
Expand Down Expand Up @@ -103,7 +100,7 @@ def commitCache(self, initialState, cache, jobLog):
return S_OK(False)
gLogger.verbose(f"Job {self.__jid}: About to execute trace. Current state {initialState}")

data = {"att": [], "jobp": [], "optp": []}
data = {"att": [], "optp": []}
for key in cache:
for dk in data:
if key.find(f"{dk}.") == 0:
Expand All @@ -118,11 +115,6 @@ def commitCache(self, initialState, cache, jobLog):
if not result["OK"]:
return result

if data["jobp"]:
result = self.__retryFunction(5, JobState.__db.jpDB.setJobParameters, (self.__jid, data["jobp"]))
if not result["OK"]:
return result

for k, v in data["optp"]:
result = self.__retryFunction(5, JobState.__db.jobDB.setJobOptParameter, (self.__jid, k, v))
if not result["OK"]:
Expand Down

0 comments on commit b42df9b

Please sign in to comment.