Skip to content

Commit

Permalink
schedd.xquery is deprecated. Use schedd.query. Fix dmwm#8447 (dmwm#8449)
Browse files Browse the repository at this point in the history
  • Loading branch information
belforte authored May 31, 2024
1 parent 806226a commit b129645
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/python/TaskWorker/Actions/DagmanSubmitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def duplicateCheck(self, task):
'&& (isUndefined(CRAB_Attempt) || CRAB_Attempt == 0)'

self.logger.debug("Duplicate check is querying the schedd: %s", rootConst)
results = list(schedd.xquery(rootConst, []))
results = list(schedd.query(rootConst, []))
self.logger.debug("Schedd queried %s", results)
except Exception as exp:
msg = "The CRAB server backend was not able to contact the Grid scheduler."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def execute_schedd(self, schedd_name, collector):
self.logger.debug("Schedd found at %s", schedd_ad['MyAddress'])
schedd = htcondor.Schedd(schedd_ad)
self.logger.debug("Querying schedd for CRAB3 tasks.")
task_ads = list(schedd.xquery('TaskType =?= "ROOT" && CRAB_HC =!= "True"', QUERY_ATTRS))
task_ads = list(schedd.query('TaskType =?= "ROOT" && CRAB_HC =!= "True"', QUERY_ATTRS))
self.logger.info("There were %d tasks found.", len(task_ads))
ads = {}
now = time.time()
Expand Down
4 changes: 2 additions & 2 deletions src/script/Monitor/GenerateMONIT.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,11 +292,11 @@ def execute(self):
continue
schedd = htcondor.Schedd(scheddAdd)
try:
idleDags = list(schedd.xquery(pickSchedulerIdle))
idleDags = list(schedd.query(pickSchedulerIdle))
except Exception:
idleDags = []
try:
runningTPs = list(schedd.xquery(pickLocalRunning))
runningTPs = list(schedd.query(pickLocalRunning))
except Exception:
runningTPs = []
numDagIdle = len(idleDags)
Expand Down

0 comments on commit b129645

Please sign in to comment.