commit/galaxy-central: dannon: Relocate job_lock from the queue to the JobManager itself. This fixes NoopQueue not having a job_lock errors seen in Admin->Jobs
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/5454f62f54df/ Changeset: 5454f62f54df User: dannon Date: 2014-10-13 14:19:32+00:00 Summary: Relocate job_lock from the queue to the JobManager itself. This fixes NoopQueue not having a job_lock errors seen in Admin->Jobs Affected #: 4 files diff -r 04015a2bc7375f1179950a3f698353d033fc3a5d -r 5454f62f54df718c61ef4bf5f5446249f6525024 lib/galaxy/jobs/handler.py --- a/lib/galaxy/jobs/handler.py +++ b/lib/galaxy/jobs/handler.py @@ -53,7 +53,6 @@ """Start the job manager""" self.app = app self.dispatcher = dispatcher - self.job_lock = False self.sa_session = app.model.context self.track_jobs_in_database = self.app.config.track_jobs_in_database @@ -174,7 +173,7 @@ try: # If jobs are locked, there's nothing to monitor and we skip # to the sleep. - if not self.job_lock: + if not self.app.job_manager.job_lock: self.__monitor_step() except: log.exception( "Exception in monitor_step" ) diff -r 04015a2bc7375f1179950a3f698353d033fc3a5d -r 5454f62f54df718c61ef4bf5f5446249f6525024 lib/galaxy/jobs/manager.py --- a/lib/galaxy/jobs/manager.py +++ b/lib/galaxy/jobs/manager.py @@ -26,6 +26,7 @@ else: self.job_handler = NoopHandler() self.job_queue = self.job_stop_queue = NoopQueue() + self.job_lock = False self.job_handler.start() def shutdown( self ): diff -r 04015a2bc7375f1179950a3f698353d033fc3a5d -r 5454f62f54df718c61ef4bf5f5446249f6525024 lib/galaxy/queue_worker.py --- a/lib/galaxy/queue_worker.py +++ b/lib/galaxy/queue_worker.py @@ -110,7 +110,7 @@ job_lock = kwargs.get('job_lock', False) # job_queue is exposed in the root app, but this will be 'fixed' at some # point, so we're using the reference from the handler. - app.job_manager.job_handler.job_queue.job_lock = job_lock + app.job_manager.job_lock = job_lock log.info("Administrative Job Lock is now set to %s. Jobs will %s dispatch." % (job_lock, "not" if job_lock else "now")) diff -r 04015a2bc7375f1179950a3f698353d033fc3a5d -r 5454f62f54df718c61ef4bf5f5446249f6525024 lib/galaxy/web/base/controllers/admin.py --- a/lib/galaxy/web/base/controllers/admin.py +++ b/lib/galaxy/web/base/controllers/admin.py @@ -1107,7 +1107,7 @@ kwargs={'job_lock': False } ) job_lock = False else: - job_lock = trans.app.job_manager.job_handler.job_queue.job_lock + job_lock = trans.app.job_manager.job_lock cutoff_time = datetime.utcnow() - timedelta( seconds=int( cutoff ) ) jobs = trans.sa_session.query( trans.app.model.Job ) \ .filter( and_( trans.app.model.Job.table.c.update_time < cutoff_time, 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.
participants (1)
-
commits-noreply@bitbucket.org