Skip to content

Commit

Permalink
Fix incorrect logic in replaced assert
Browse files Browse the repository at this point in the history
  • Loading branch information
stxue1 committed Sep 13, 2023
1 parent d7e1163 commit c9afc8d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/toil/leader.py
Original file line number Diff line number Diff line change
Expand Up @@ -539,13 +539,13 @@ def _processReadyJob(self, job_id: str, result_status: int):
# the job has services to run, which have not been started, start them
# Build a map from the service jobs to the job and a map
# of the services created for the job
if readyJob.jobStoreID not in self.toilState.servicesIssued:
raise RuntimeError("The job was already issued.")
if readyJob.jobStoreID in self.toilState.servicesIssued:
raise RuntimeError(f"The ready job: {readyJob.jobStoreID} was already issued.")
self.toilState.servicesIssued[readyJob.jobStoreID] = set()
for serviceJobList in readyJob.serviceHostIDsInBatches():
for serviceID in serviceJobList:
if serviceID in self.toilState.service_to_client:
raise RuntimeError(f"The service ID {serviceID} was already added.")
raise RuntimeError(f"The ready service ID: {serviceID} was already added.")
self.toilState.reset_job(serviceID)
serviceHost = self.toilState.get_job(serviceID)
self.toilState.service_to_client[serviceID] = readyJob.jobStoreID
Expand Down

0 comments on commit c9afc8d

Please sign in to comment.