Skip to content
This repository has been archived by the owner on Mar 16, 2022. It is now read-only.

Commit

Permalink
max_jobs <=0 indicates an error, for now
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Dunn committed Aug 2, 2018
1 parent ecbed43 commit 6c7d284
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pypeflow/simple_pwatcher_bridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,9 @@ def _refreshTargets(self, updateFreq, exitOnFailure):
while ready or submitted:
# Nodes cannot be in ready or submitted unless they are also in unsatg.
to_submit = set()
if self.max_jobs <= 0:
msg = 'self.max_jobs={}'.format(self.max_jobs)
raise Exception(msg)
while ready and (self.max_jobs > len(submitted) + len(to_submit)):
node = ready.pop()
to_submit.add(node)
Expand Down

0 comments on commit 6c7d284

Please sign in to comment.