Skip to content

Commit

Permalink
fix unknown jobs (#375)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsschult authored Oct 3, 2024
1 parent e7c2cdf commit fd1d56b
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions iceprod/server/plugins/condor.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ def save_timestamp(self):
async def run(self, forever=True):
# initial job load from JELs
try:
await self.wait(timeout=0, reload_jobs=True)
await self.wait(timeout=0)
except Exception:
logger.warning('failed to wait', exc_info=True)

Expand Down Expand Up @@ -491,13 +491,12 @@ def get_current_JEL(self) -> Path:

# JEL processing #

async def wait(self, timeout, reload_jobs=False):
async def wait(self, timeout):
"""
Wait for jobs to complete from the Job Event Logs.
Args:
timeout: wait up to N seconds
reload_jobs: accept unknown jobs
"""
start = time.monotonic()

Expand All @@ -516,13 +515,10 @@ async def wait(self, timeout, reload_jobs=False):
if event.type == htcondor.JobEventType.SUBMIT:
self.jobs[job_id] = CondorJob()
continue
elif reload_jobs and job_id not in self.jobs:
elif job_id not in self.jobs:
logger.debug('reloaded job %s', job_id)
self.jobs[job_id] = CondorJob()

if job_id not in self.jobs:
logger.warning('unknown job: %s', job_id)
continue
job = self.jobs[job_id]

if event.type == htcondor.JobEventType.JOB_AD_INFORMATION:
Expand Down

0 comments on commit fd1d56b

Please sign in to comment.