1 new changeset in galaxy-central: http://bitbucket.org/galaxy/galaxy-central/changeset/0b1fa1746a4c/ changeset: r5065:0b1fa1746a4c user: natefoo date: 2011-02-15 22:52:16 summary: lazy load jobs for job recovery and a bugfix for administrative job stops when tracking jobs in the database. affected #: 1 file (98 bytes) --- a/lib/galaxy/jobs/__init__.py Tue Feb 15 15:15:54 2011 -0500 +++ b/lib/galaxy/jobs/__init__.py Tue Feb 15 16:52:16 2011 -0500 @@ -112,7 +112,7 @@ else: log.debug( "no runner: %s is still in new state, adding to the jobs queue" %job.id ) self.queue.put( ( job.id, job.tool_id ) ) - for job in self.sa_session.query( model.Job ).filter( ( model.Job.state == model.Job.states.RUNNING ) | ( model.Job.state == model.Job.states.QUEUED ) ): + for job in self.sa_session.query( model.Job ).options( lazyload( "external_output_metadata" ), lazyload( "parameters" ) ).filter( ( model.Job.state == model.Job.states.RUNNING ) | ( model.Job.state == model.Job.states.QUEUED ) ): if job.tool_id not in self.app.toolbox.tools_by_id: log.warning( "Tool '%s' removed from tool config, unable to recover job: %s" % ( job.tool_id, job.id ) ) JobWrapper( job, self ).fail( 'This tool was disabled before the job completed. Please contact your Galaxy administrator, or' ) @@ -1129,18 +1129,18 @@ .filter( model.Job.state == model.Job.states.DELETED_NEW ).all() for job in newly_deleted_jobs: jobs_to_check.append( ( job, None ) ) - else: - try: - while 1: - message = self.queue.get_nowait() - if message is self.STOP_SIGNAL: - return - # Unpack the message - job_id, error_msg = message - # Get the job object and append to watch queue - jobs_to_check.append( ( self.sa_session.query( model.Job ).get( job_id ), error_msg ) ) - except Empty: - pass + # Also pull from the queue (in the case of Administrative stopped jobs) + try: + while 1: + message = self.queue.get_nowait() + if message is self.STOP_SIGNAL: + return + # Unpack the message + job_id, error_msg = message + # Get the job object and append to watch queue + jobs_to_check.append( ( self.sa_session.query( model.Job ).get( job_id ), error_msg ) ) + except Empty: + pass for job, error_msg in jobs_to_check: if error_msg is not None: job.state = job.states.ERROR Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.