Skip to content

Instantly share code, notes, and snippets.

@jmchilton
Created January 30, 2015 15:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmchilton/d0afd7242370642d5b43 to your computer and use it in GitHub Desktop.
Save jmchilton/d0afd7242370642d5b43 to your computer and use it in GitHub Desktop.
diff --git a/lib/galaxy/jobs/runners/util/condor/__init__.py b/lib/galaxy/jobs/runners/util/condor/__init__.py
index d0103ca..fc63cbe 100644
--- a/lib/galaxy/jobs/runners/util/condor/__init__.py
+++ b/lib/galaxy/jobs/runners/util/condor/__init__.py
@@ -3,6 +3,9 @@ Condor helper utilities.
"""
from subprocess import Popen, PIPE, STDOUT, check_call, CalledProcessError
from ..external import parse_external_id
+import time
+import logging
+log = logging.getLogger( __name__ )
DEFAULT_QUERY_CLASSAD = dict(
universe='vanilla',
@@ -70,12 +73,16 @@ def condor_submit(submit_file):
try:
submit = Popen(('condor_submit', submit_file), stdout=PIPE, stderr=STDOUT)
message, _ = submit.communicate()
+ log.info("condor_submit yielded message [%s]" % message)
if submit.returncode == 0:
external_id = parse_external_id(message, type='condor')
else:
+ log.info("Problem submitting condor job - hopefully previous message helps.")
message = PROBLEM_PARSING_EXTERNAL_ID
except Exception as e:
message = str(e)
+ time.sleep(5)
+ log.info("Returning condor external id [%s] and message [%s]" % (external_id, message))
return external_id, message
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment