# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User Nate Coraor <nate(a)bx.psu.edu>
# Date 1280411093 14400
# Node ID af48a13e46b9ab0136bcbf14508bd9bb044ad257
# Parent 9780508ee0c31b132158842afcae6c5ef90028a7
Fix a bug in the sge runner's stop_job and job finishing logic.
--- a/lib/galaxy/jobs/runners/sge.py
+++ b/lib/galaxy/jobs/runners/sge.py
@@ -69,6 +69,7 @@ class SGEJobRunner( object ):
if DRMAA is None:
raise Exception( "SGEJobRunner requires DRMAA_python which was not found" )
self.app = app
+ self.sa_session = app.model.context
# 'watched' and 'queue' are both used to keep track of jobs to watch.
# 'queue' is used to add new watched jobs, and can be called from
# any thread (usually by the 'queue_job' method). 'watched' must only
@@ -291,13 +292,9 @@ class SGEJobRunner( object ):
if state == DRMAA.Session.RUNNING and not sge_job_state.running:
sge_job_state.running = True
sge_job_state.job_wrapper.change_state( model.Job.states.RUNNING )
- if state == DRMAA.Session.DONE:
+ if state in ( DRMAA.Session.DONE, DRMAA.Session.FAILED ):
self.work_queue.put( ( 'finish', sge_job_state ) )
continue
- if state == DRMAA.Session.FAILED:
- sge_job_state.fail_message = "Cluster could not complete job"
- self.work_queue.put( ( 'fail', sge_job_state ) )
- continue
sge_job_state.old_state = state
new_watched.append( sge_job_state )
# Replace the watch list with the updated version
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User Greg Von Kuster <greg(a)bx.psu.edu>
# Date 1280263037 14400
# Node ID 5401c7d2e13bbd214e1a424e71c4fbcbac7cf919
# Parent eacdaf59c8dea773a8525966a8c6b65753ab777c
Bug fix for verifying a tool suite uploaded to the tool shed.
--- a/lib/galaxy/webapps/community/datatypes/__init__.py
+++ b/lib/galaxy/webapps/community/datatypes/__init__.py
@@ -148,7 +148,7 @@ class ToolSuite( Tool ):
tar = tarfile.open( f.name )
except tarfile.ReadError:
raise DatatypeVerificationError( 'The archive is not a readable tar file.' )
- suite_config = filter( lambda x: x.lower() == 'suite_config.xml', tar.getnames() )
+ suite_config = filter( lambda x: x.lower().find( 'suite_config.xml' ) >=0, tar.getnames() )
if not suite_config:
raise DatatypeVerificationError( 'The archive does not contain the required suite_config.xml config file. If you are uploading a single tool archive, set the upload type to "Tool".' )
suite_config = suite_config[ 0 ]