Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug when updating grace period in GEJobRunner #91

Merged
merged 2 commits into from Apr 30, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 6 additions & 5 deletions bcftbx/JobRunner.py
Expand Up @@ -798,19 +798,20 @@ def __update_job_grace_period(self,job_id):
try:
start_time = self.__start_time[job_id]
except KeyError:
logging.warning("GEJobRunner: update grace period: job %s "
"has gone away (ignored)" % job_id)
logging.debug("GEJobRunner: update grace period: job %s "
"has gone away (ignored)" % job_id)
self.__updating_grace_period.release(lock)
return
if ((time.time() - start_time) > self.__new_job_grace_period):
# Job no longer in grace period
logging.debug("GEJobRunner: job %s no longer in grace "
"period" % job_id)
try:
del(self.__start_time[job_id])
except KeyError:
logging.warning("GEJobRunner: update grace period: "
"job %s has gone away (ignored)" %
job_id)
logging.debug("GEJobRunner: update grace period: "
"job %s has gone away (ignored)" %
job_id)
# Release update lock
self.__updating_grace_period.release(lock)

Expand Down