Skip to content

Commit

Permalink
feat: add batchSystem type in jobParameters
Browse files Browse the repository at this point in the history
  • Loading branch information
aldbr committed Nov 20, 2023
1 parent a2efbf1 commit 9aa08e3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ def test_getResourcUsage(mocker):
side_effect=[S_OK(RRCKI_OUT)],
)
mocker.patch("os.path.isfile", return_value=True)
mocker.patch.dict(os.environ, {"PBS_O_QUEUE": "lhcb", "PBS_O_QPATH": "/some/path"})

pbsRU = PBSResourceUsage("55755440.seer.t1.grid.kiae.ru", {"Queue": "lhcb", "BinaryPath": "/some/path"})
res = pbsRU.getResourceUsage()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def test_getResourceUsage(mocker):
return_value=S_OK(RESULT_FROM_SGE),
)

sgeResourceUsage = SGEResourceUsage()
sgeResourceUsage = SGEResourceUsage("1234", {"Queue": "Test"})
res = sgeResourceUsage.getResourceUsage()

assert res["OK"]
Expand Down
3 changes: 3 additions & 0 deletions src/DIRAC/WorkloadManagementSystem/Agent/JobAgent.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,9 @@ def execute(self):
if queue:
self.jobReport.setJobParameter(par_name="CEQueue", par_value=queue, sendFlag=False)

if batchSystem := gConfig.getValue("/LocalSite/BatchSystem/Type", ""):
self.jobReport.setJobParameter(par_name="BatchSystem", par_value=batchSystem, sendFlag=False)

self.log.debug(f"Before self._submitJob() ({self.ceName}CE)")
result = self._submitJob(
jobID=jobID,
Expand Down

0 comments on commit 9aa08e3

Please sign in to comment.