From 19d06f68a05878ce25d718b2e174f84e4b4e142b Mon Sep 17 00:00:00 2001 From: Greg Von Kuster Date: Fri, 28 Sep 2007 19:36:49 +0000 Subject: [PATCH] Reverted some logging changes since James pointed out their redundancy. --- lib/galaxy/jobs/__init__.py | 12 ++++++------ lib/galaxy/jobs/runners/local.py | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/galaxy/jobs/__init__.py b/lib/galaxy/jobs/__init__.py index b901ec87e1a..f39d33d7657 100644 --- a/lib/galaxy/jobs/__init__.py +++ b/lib/galaxy/jobs/__init__.py @@ -97,8 +97,8 @@ class JobQueue( object ): while self.running: try: self.monitor_step() - except Exception, exc: - log.exception( "Exception in monitor_step: %s" %str( exc )) + except: + log.exception( "Exception in monitor_step" ) # Sleep self.sleeper.sleep( 1 ) @@ -147,8 +147,8 @@ class JobQueue( object ): log.debug( "job %d dispatched" %job.job_id) else: log.error( "unknown job state '%s' for job %d" %( job_state, job.job_id )) - except Exception, exc: - log.exception("failure running job %d, error: %s" %( job.job_id, str( exc ))) + except: + log.exception( "failure running job %d" %job.job_id ) # Update the waiting list self.waiting = new_waiting @@ -163,9 +163,9 @@ class JobQueue( object ): log.debug( "job %d dispatched" %sjob.job_id ) except Empty : # squeue is empty, so stop dispatching break - except Exception, exc: # if something else breaks while dispatching + except: # if something else breaks while dispatching job.fail( "failure dispatching job" ) - log.exception("failure running job %d, error: %s" %( sjob.job_id, str( exc ))) + log.exception( "failure running job %d" %sjob.job_id ) def put( self, job_id, tool ): """Add a job to the queue (by job identifier)""" diff --git a/lib/galaxy/jobs/runners/local.py b/lib/galaxy/jobs/runners/local.py index 7c99b816d3f..bf6ca2aba2c 100644 --- a/lib/galaxy/jobs/runners/local.py +++ b/lib/galaxy/jobs/runners/local.py @@ -43,9 +43,9 @@ class LocalJobRunner( object ): try: job_wrapper.prepare() command_line = job_wrapper.get_command_line() - except Exception, exc: + except: job_wrapper.fail( "failure preparing job", exception=True ) - log.exception("failure running job %d, error: %s" %( job_wrapper.job_id, str( exc ))) + log.exception("failure running job %d" % job_wrapper.job_id) return # If we were able to get a command line, run the job if command_line: @@ -62,7 +62,7 @@ class LocalJobRunner( object ): log.debug('execution finished: %s' % command_line) except Exception, exc: job_wrapper.fail( "failure running job", exception=True ) - log.exception("failure running job %d, error: %s" %( job_wrapper.job_id, str( exc ))) + log.exception("failure running job %d" % job_wrapper.job_id) return # Finish the job job_wrapper.finish( stdout, stderr )