Skip to content

Commit 6dd34b5

Browse files
committed
feat: remove PilotManager dependency from HTCondorCE
1 parent 889337e commit 6dd34b5

2 files changed

Lines changed: 3 additions & 28 deletions

File tree

src/DIRAC/Resources/Computing/HTCondorCEComputingElement.py

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -386,33 +386,8 @@ def killJob(self, jobIDList):
386386

387387
#############################################################################
388388
def getCEStatus(self):
389-
"""Method to return information on running and pending jobs.
390-
391-
Warning: information currently returned depends on the PilotManager and not HTCondor.
392-
Results might be wrong if pilots or jobs are submitted manually via the CE.
393-
"""
394-
result = S_OK()
395-
result["SubmittedJobs"] = 0
396-
result["RunningJobs"] = 0
397-
result["WaitingJobs"] = 0
398-
399-
# getWaitingPilots
400-
condDict = {"DestinationSite": self.ceName, "Status": PilotStatus.PILOT_WAITING_STATES}
401-
res = PilotManagerClient().countPilots(condDict)
402-
if res["OK"]:
403-
result["WaitingJobs"] = int(res["Value"])
404-
else:
405-
self.log.warn(f"Failure getting pilot count for {self.ceName}: {res['Message']} ")
406-
407-
# getRunningPilots
408-
condDict = {"DestinationSite": self.ceName, "Status": PilotStatus.RUNNING}
409-
res = PilotManagerClient().countPilots(condDict)
410-
if res["OK"]:
411-
result["RunningJobs"] = int(res["Value"])
412-
else:
413-
self.log.warn(f"Failure getting pilot count for {self.ceName}: {res['Message']} ")
414-
415-
return result
389+
"""Method to return information on running and pending jobs."""
390+
return S_ERROR("getCEStatus not implemented for HTCondorCEComputingElement")
416391

417392
def getJobStatus(self, jobIDList):
418393
"""Get the status information for the given list of jobs"""

src/DIRAC/WorkloadManagementSystem/Agent/SiteDirector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from typing import Any
1515

1616
import DIRAC
17-
from DIRAC import S_ERROR, S_OK, gConfig
17+
from DIRAC import S_ERROR, S_OK
1818
from DIRAC.AccountingSystem.Client.DataStoreClient import gDataStoreClient
1919
from DIRAC.AccountingSystem.Client.Types.Pilot import Pilot as PilotAccounting
2020
from DIRAC.AccountingSystem.Client.Types.PilotSubmission import (

0 commit comments

Comments
 (0)