From b42df9b8df7c8d86a0823399d3e12a02223f609d Mon Sep 17 00:00:00 2001 From: Federico Stagni Date: Thu, 27 Jun 2024 15:38:01 +0200 Subject: [PATCH] fix: JobState does not need to push JobParameters --- .../Client/JobState/JobState.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/DIRAC/WorkloadManagementSystem/Client/JobState/JobState.py b/src/DIRAC/WorkloadManagementSystem/Client/JobState/JobState.py index 7a80d9f17bb..8280b6abe4a 100644 --- a/src/DIRAC/WorkloadManagementSystem/Client/JobState/JobState.py +++ b/src/DIRAC/WorkloadManagementSystem/Client/JobState/JobState.py @@ -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, @@ -26,7 +25,6 @@ def reset(self): self.jobDB = None self.logDB = None self.tqDB = None - self.jobParametersDB = None __db = DBHold() @@ -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 @@ -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: @@ -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"]: