1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/445b212b1c6d/ changeset: 445b212b1c6d user: natefoo date: 2013-02-19 17:30:29 summary: Fix the manage jobs admin interface broken by the removal of the manager. This necessitated removing the job lock feature, although it should return in a future release when we have handler communication outside the database. affected #: 4 files diff -r 9852dd712f5c628d1f635fe643f036eb2b930863 -r 445b212b1c6d8159cb5b6f81300cf5dd3f1eebee lib/galaxy/jobs/__init__.py --- a/lib/galaxy/jobs/__init__.py +++ b/lib/galaxy/jobs/__init__.py @@ -1690,7 +1690,7 @@ """ Implements the JobQueue / JobStopQueue interface but does nothing """ - def put( self, *args ): + def put( self, *args, **kwargs ): return def put_stop( self, *args ): return diff -r 9852dd712f5c628d1f635fe643f036eb2b930863 -r 445b212b1c6d8159cb5b6f81300cf5dd3f1eebee lib/galaxy/jobs/handler.py --- a/lib/galaxy/jobs/handler.py +++ b/lib/galaxy/jobs/handler.py @@ -493,7 +493,7 @@ .filter( ( model.Job.state == model.Job.states.DELETED_NEW ) \ & ( model.Job.handler == self.app.config.server_name ) ).all() for job in newly_deleted_jobs: - jobs_to_check.append( ( job, None ) ) + jobs_to_check.append( ( job, job.stderr ) ) # Also pull from the queue (in the case of Administrative stopped jobs) try: while 1: diff -r 9852dd712f5c628d1f635fe643f036eb2b930863 -r 445b212b1c6d8159cb5b6f81300cf5dd3f1eebee lib/galaxy/web/base/controllers/admin.py --- a/lib/galaxy/web/base/controllers/admin.py +++ b/lib/galaxy/web/base/controllers/admin.py @@ -1016,8 +1016,6 @@ deleted = [] msg = None status = None - if self.app.config.job_manager != self.app.config.server_name: - return trans.show_error_message( 'This Galaxy instance (%s) is not the job manager (%s). If using multiple servers, please directly access the job manager instance to manage jobs.' % (self.app.config.server_name, self.app.config.job_manager) ) job_ids = util.listify( stop ) if job_ids and stop_msg in [ None, '' ]: msg = 'Please enter an error message to display to the user describing why the job was terminated' @@ -1026,7 +1024,15 @@ if stop_msg[-1] not in PUNCTUATION: stop_msg += '.' for job_id in job_ids: - trans.app.job_manager.job_stop_queue.put( job_id, error_msg="This job was stopped by an administrator: %s For more information or help" % stop_msg ) + error_msg = "This job was stopped by an administrator: %s <a href='%s' target='_blank'>Contact support</a> for additional help." \ + % ( stop_msg, self.app.config.get("support_url", "http://wiki.galaxyproject.org/Support" ) ) + if trans.app.config.track_jobs_in_database: + job = trans.app.model.Job.get( job_id ) + job.stderr = error_msg + job.state = trans.app.model.Job.states.DELETED_NEW + trans.sa_session.add( job ) + else: + trans.app.job_manager.job_stop_queue.put( job_id, error_msg=error_msg ) deleted.append( str( job_id ) ) if deleted: msg = 'Queued job' @@ -1035,11 +1041,7 @@ msg += ' for deletion: ' msg += ', '.join( deleted ) status = 'done' - if ajl_submit: - if job_lock == 'on': - trans.app.job_manager.job_queue.job_lock = True - else: - trans.app.job_manager.job_queue.job_lock = False + trans.sa_session.flush() 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, @@ -1060,8 +1062,7 @@ last_updated = last_updated, cutoff = cutoff, msg = msg, - status = status, - job_lock = trans.app.job_manager.job_queue.job_lock ) + status = status ) ## ---- Utility methods ------------------------------------------------------- diff -r 9852dd712f5c628d1f635fe643f036eb2b930863 -r 445b212b1c6d8159cb5b6f81300cf5dd3f1eebee templates/admin/jobs.mako --- a/templates/admin/jobs.mako +++ b/templates/admin/jobs.mako @@ -46,6 +46,7 @@ <td>Last Update</td><td>Tool</td><td>State</td> + <td>Inputs</td><td>Command Line</td><td>Job Runner</td><td>PID/Cluster ID</td> @@ -67,6 +68,13 @@ <td>${last_updated[job.id]} ago</td><td>${job.tool_id}</td><td>${job.state}</td> + <% + try: + inputs = ", ".join( [ '%s %s' % ( da.dataset.id, da.dataset.state ) for da in job.input_datasets ] ) + except: + inputs = 'Unable to determine inputs' + %> + <td>${inputs}</td><td>${job.command_line}</td><td>${job.job_runner_name}</td><td>${job.job_runner_external_id}</td> @@ -125,32 +133,3 @@ </div></div></form> -<form name="jobs" action="${h.url_for(controller='admin', action='jobs')}" method="POST"> - <p/> - <div class="toolForm"> - <div class="toolFormTitle"> - Administrative Job Lock - </div> - <div class="toolFormBody"> - <div class="form-row"> - <input type="hidden" name="ajl_submit" value="True"/> - %if job_lock==True: - <p>Job dispatching is currently <strong>locked</strong>.</p> - <label> - <input type='checkbox' name='job_lock' checked='checked' /> - Prevent jobs from dispatching. - </label> - %else: - <p>Job dispatching is currently <strong>unlocked</strong>.</p> - <label> - <input type='checkbox' name='job_lock' /> - Prevent jobs from dispatching. - </label> - %endif - </div> - <div class="form-row"> - <input type="submit" class="primary-button" name="submit" value="Update"> - </div> - </div> - </div> -</form> 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.