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

sleep for a while in between failed job submissions #717

Merged
merged 1 commit into from Oct 13, 2013
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
5 changes: 5 additions & 0 deletions easybuild/tools/pbs_job.py
Expand Up @@ -31,6 +31,7 @@
"""

import os
import time
from vsc import fancylogger

_log = fancylogger.getLogger('pbs_job', fname=False)
Expand Down Expand Up @@ -227,6 +228,10 @@ def submit(self):
if jobid is not None:
break
self.log.warning("Job submission returned None as ID, retrying job submission (attempt %d)" % attempt)
# sleep for a short while after failed attempt
self.log.debug("Starting sleep...")
time.sleep(5)
self.log.debug("Done sleeping...")
# make sure job was properly submitted
is_error, errormsg = pbs.error()
if is_error or jobid is None:
Expand Down