MikeDacre / fyrd

Submit functions and shell scripts to torque and slurm clusters or local machines using python.
https://fyrd.science
MIT License
22 stars 8 forks source link

Stop wait for hanging forever if job not in queue #15

Closed jbloom closed 8 years ago

jbloom commented 8 years ago

It appears that the desired behavior here was to throw an Exception if the job could not be found in the queue two times in a row (after _notfound reached 3). But because _notfound was reset to zero every time in the loop, this condition was never reached. So if the job was not in the queue, wait would hang infinitely. This change moves _notfound = 0 outside of the loop.