@@ -96,11 +96,11 @@ async def start(self):
9696 def sub ():
9797 try :
9898 classads = []
99- with SCHEDD .transaction () as txn :
99+ with SCHEDD () .transaction () as txn :
100100 cluster_id = job .queue (txn , ad_results = classads )
101101
102102 logger .debug (f"ClassAds for job { cluster_id } : { classads } " )
103- SCHEDD .spool (classads )
103+ SCHEDD () .spool (classads )
104104 return cluster_id
105105 except htcondor .HTCondorInternalError as ex :
106106 logger .error (str (ex ))
@@ -136,7 +136,7 @@ async def close(self):
136136
137137 def check_gone ():
138138 try :
139- return len (SCHEDD .query (f"ClusterId == { self .job_id } " )) == 0
139+ return len (SCHEDD () .query (f"ClusterId == { self .job_id } " )) == 0
140140 except htcondor .HTCondorIOError as ex :
141141 logger .error (str (ex ))
142142 return False
@@ -168,7 +168,7 @@ def check_gone():
168168
169169 def stop ():
170170 try :
171- res = SCHEDD .act (
171+ res = SCHEDD () .act (
172172 htcondor .JobAction .Remove , f"ClusterId == { self .job_id } "
173173 )
174174 if res ["TotalSuccess" ] == 1 and res ["TotalChangedAds" ] == 1 :
@@ -195,7 +195,7 @@ def _close_job(cls, job_id):
195195 f"Last-ditch attempt to close HTCondor job { job_id } in finalizer! You should confirm the job exits!"
196196 )
197197 try :
198- SCHEDD .act (htcondor .JobAction .Remove , f"ClusterId == { job_id } " )
198+ SCHEDD () .act (htcondor .JobAction .Remove , f"ClusterId == { job_id } " )
199199 except htcondor .HTCondorIOError as ex :
200200 logger .error (str (ex ))
201201 cls .known_jobs .discard (job_id )
0 commit comments