4 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/84022ca3c573/ changeset: 84022ca3c573 user: carlfeberhard date: 2012-11-30 02:23:14 summary: history panel: remove IE-incompatible console statements affected #: 3 files diff -r 2aae11d62620b6c839b513d68a06d2cc57c5fa21 -r 84022ca3c5733277d8666a999edcb11381f40394 static/scripts/mvc/history/history-model.js --- a/static/scripts/mvc/history/history-model.js +++ b/static/scripts/mvc/history/history-model.js @@ -187,9 +187,9 @@ // if not interruption by iframe reload //TODO: remove when iframes are removed if( !( ( xhr.readyState === 0 ) && ( xhr.status === 0 ) ) ){ - if( console && console.warn ){ - console.warn( 'Error getting history updates from the server:', xhr, status, error ); - } + //if( console && console.warn ){ + // console.warn( 'Error getting history updates from the server:', xhr, status, error ); + //} alert( _l( 'Error getting history updates from the server.' ) + '\n' + error ); } }); diff -r 2aae11d62620b6c839b513d68a06d2cc57c5fa21 -r 84022ca3c5733277d8666a999edcb11381f40394 static/scripts/packed/mvc/history/history-model.js --- a/static/scripts/packed/mvc/history/history-model.js +++ b/static/scripts/packed/mvc/history/history-model.js @@ -1,1 +1,1 @@ -var History=BaseModel.extend(LoggableMixin).extend({defaults:{id:"",name:"",state:"",diskSize:0,deleted:false,annotation:null,message:null},urlRoot:"api/histories/",url:function(){return"api/histories/"+this.get("id")},initialize:function(a,b){this.log(this+".initialize:",a,b);this.hdas=new HDACollection();if(b&&b.length){this.hdas.reset(b);this.checkForUpdates()}},loadFromApi:function(a,c){var b=this;b.attributes.id=a;jQuery.when(jQuery.ajax("api/users/current"),b.fetch()).then(function(e,d){b.attributes.user=e[0];b.trigger("loaded:user",e[0]);b.trigger("loaded",d[0])}).then(function(){jQuery.ajax(b.url()+"/contents?"+jQuery.param({ids:b.hdaIdsFromStateIds().join(",")})).success(function(d){b.hdas.reset(d);b.checkForUpdates();b.trigger("loaded:hdas",d);if(c){callback(b)}})})},hdaIdsFromStateIds:function(){return _.reduce(_.values(this.get("state_ids")),function(b,a){return b.concat(a)})},checkForUpdates:function(a){if(this.hdas.running().length){this.stateUpdater()}else{this.trigger("ready")}return this},stateUpdater:function(){var c=this,a=this.get("state"),b=this.get("state_ids");jQuery.ajax("api/histories/"+this.get("id")).success(function(d){c.set(d);c.log("current history state:",c.get("state"),"(was)",a,"new size:",c.get("nice_size"));var e=[];_.each(_.keys(d.state_ids),function(g){var f=_.difference(d.state_ids[g],b[g]);e=e.concat(f)});if(e.length){c.hdas.update(e)}if((c.get("state")===HistoryDatasetAssociation.STATES.RUNNING)||(c.get("state")===HistoryDatasetAssociation.STATES.QUEUED)){setTimeout(function(){c.stateUpdater()},4000)}else{c.trigger("ready")}}).error(function(f,d,e){if(!((f.readyState===0)&&(f.status===0))){if(console&&console.warn){console.warn("Error getting history updates from the server:",f,d,e)}alert(_l("Error getting history updates from the server.")+"\n"+e)}})},toString:function(){var a=(this.get("name"))?(","+this.get("name")):("");return"History("+this.get("id")+a+")"}});var HistoryCollection=Backbone.Collection.extend(LoggableMixin).extend({model:History,urlRoot:"api/histories"}); \ No newline at end of file +var History=BaseModel.extend(LoggableMixin).extend({defaults:{id:"",name:"",state:"",diskSize:0,deleted:false,annotation:null,message:null},urlRoot:"api/histories/",url:function(){return"api/histories/"+this.get("id")},initialize:function(a,b){this.log(this+".initialize:",a,b);this.hdas=new HDACollection();if(b&&b.length){this.hdas.reset(b);this.checkForUpdates()}},loadFromApi:function(a,c){var b=this;b.attributes.id=a;jQuery.when(jQuery.ajax("api/users/current"),b.fetch()).then(function(e,d){b.attributes.user=e[0];b.trigger("loaded:user",e[0]);b.trigger("loaded",d[0])}).then(function(){jQuery.ajax(b.url()+"/contents?"+jQuery.param({ids:b.hdaIdsFromStateIds().join(",")})).success(function(d){b.hdas.reset(d);b.checkForUpdates();b.trigger("loaded:hdas",d);if(c){callback(b)}})})},hdaIdsFromStateIds:function(){return _.reduce(_.values(this.get("state_ids")),function(b,a){return b.concat(a)})},checkForUpdates:function(a){if(this.hdas.running().length){this.stateUpdater()}else{this.trigger("ready")}return this},stateUpdater:function(){var c=this,a=this.get("state"),b=this.get("state_ids");jQuery.ajax("api/histories/"+this.get("id")).success(function(d){c.set(d);c.log("current history state:",c.get("state"),"(was)",a,"new size:",c.get("nice_size"));var e=[];_.each(_.keys(d.state_ids),function(g){var f=_.difference(d.state_ids[g],b[g]);e=e.concat(f)});if(e.length){c.hdas.update(e)}if((c.get("state")===HistoryDatasetAssociation.STATES.RUNNING)||(c.get("state")===HistoryDatasetAssociation.STATES.QUEUED)){setTimeout(function(){c.stateUpdater()},4000)}else{c.trigger("ready")}}).error(function(f,d,e){if(!((f.readyState===0)&&(f.status===0))){alert(_l("Error getting history updates from the server.")+"\n"+e)}})},toString:function(){var a=(this.get("name"))?(","+this.get("name")):("");return"History("+this.get("id")+a+")"}});var HistoryCollection=Backbone.Collection.extend(LoggableMixin).extend({model:History,urlRoot:"api/histories"}); \ No newline at end of file diff -r 2aae11d62620b6c839b513d68a06d2cc57c5fa21 -r 84022ca3c5733277d8666a999edcb11381f40394 templates/root/alternate_history.mako --- a/templates/root/alternate_history.mako +++ b/templates/root/alternate_history.mako @@ -304,11 +304,11 @@ Galaxy.historyFrame = window; // ostensibly, this is the App - if( console && console.debug ){ - //if( console.clear ){ console.clear(); } - console.pretty = function( o ){ $( '<pre/>' ).text( JSON.stringify( o, null, ' ' ) ).appendTo( 'body' ); } - top.storage = jQuery.jStorage - } + //if( console && console.debug ){ + // //if( console.clear ){ console.clear(); } + // console.pretty = function( o ){ $( '<pre/>' ).text( JSON.stringify( o, null, ' ' ) ).appendTo( 'body' ); } + // top.storage = jQuery.jStorage + //} // LOAD INITIAL DATA IN THIS PAGE - since we're already sending it... @@ -330,7 +330,7 @@ var historyPanel = new HistoryPanel({ model : new History( history, hdas ), urlTemplates : galaxy_paths.attributes, - logger : console, + //logger : console, // is page sending in show settings? if so override history's show_deleted : ${ 'true' if show_deleted == True else ( 'null' if show_deleted == None else 'false' ) }, show_hidden : ${ 'true' if show_hidden == True else ( 'null' if show_hidden == None else 'false' ) } https://bitbucket.org/galaxy/galaxy-central/changeset/c08a5d0d2a4f/ changeset: c08a5d0d2a4f user: natefoo date: 2012-11-30 03:33:01 summary: Metadata detection would never complete if setting externally. affected #: 1 file diff -r 84022ca3c5733277d8666a999edcb11381f40394 -r c08a5d0d2a4fd1f97943174ed677e8ae17566647 lib/galaxy/jobs/handler.py --- a/lib/galaxy/jobs/handler.py +++ b/lib/galaxy/jobs/handler.py @@ -133,7 +133,7 @@ .join(model.HistoryDatasetAssociation) \ .join(model.Dataset) \ .filter(and_((model.Job.state == model.Job.states.NEW), - or_((model.HistoryDatasetAssociation._state != None), + or_((model.HistoryDatasetAssociation._state == model.HistoryDatasetAssociation.states.FAILED_METADATA), (model.HistoryDatasetAssociation.deleted == True ), (model.Dataset.state != model.Dataset.states.OK ), (model.Dataset.deleted == True)))).subquery() https://bitbucket.org/galaxy/galaxy-central/changeset/f364d992270c/ changeset: f364d992270c user: natefoo date: 2012-11-30 16:42:50 summary: Prevent waiting jobs from circumventing limits upon server startup. affected #: 1 file diff -r c08a5d0d2a4fd1f97943174ed677e8ae17566647 -r f364d992270c6201a748249c819b5cc41ed95cfb lib/galaxy/jobs/handler.py --- a/lib/galaxy/jobs/handler.py +++ b/lib/galaxy/jobs/handler.py @@ -87,8 +87,11 @@ if job.tool_id not in self.app.toolbox.tools_by_id: log.warning( "(%s) Tool '%s' removed from tool config, unable to recover job" % ( job.id, job.tool_id ) ) JobWrapper( job, self ).fail( 'This tool was disabled before the job completed. Please contact your Galaxy administrator.' ) - elif job.job_runner_name is None: - log.debug( "(%s) No job runner assigned and job still in '%s' state, adding to the job handler queue" % ( job.id, job.state ) ) + elif job.job_runner_name is None or (job.job_runner_name is not None and job.job_runner_external_id is None): + if job.job_runner_name is None: + log.debug( "(%s) No job runner assigned and job still in '%s' state, adding to the job handler queue" % ( job.id, job.state ) ) + else: + log.debug( "(%s) Job runner assigned but no external ID recorded, adding to the job handler queue" % job.id ) if self.track_jobs_in_database: job.state = model.Job.states.NEW else: https://bitbucket.org/galaxy/galaxy-central/changeset/88aba66bb813/ changeset: 88aba66bb813 user: natefoo date: 2012-11-30 16:54:58 summary: Merge back dist changes affected #: 2 files diff -r 7bfce80911c3a628710ebaaad0119ee46ea9e532 -r 88aba66bb81351cbd625ca7fb9ed39874016b36a lib/galaxy/jobs/handler.py --- a/lib/galaxy/jobs/handler.py +++ b/lib/galaxy/jobs/handler.py @@ -87,8 +87,11 @@ if job.tool_id not in self.app.toolbox.tools_by_id: log.warning( "(%s) Tool '%s' removed from tool config, unable to recover job" % ( job.id, job.tool_id ) ) JobWrapper( job, self ).fail( 'This tool was disabled before the job completed. Please contact your Galaxy administrator.' ) - elif job.job_runner_name is None: - log.debug( "(%s) No job runner assigned and job still in '%s' state, adding to the job handler queue" % ( job.id, job.state ) ) + elif job.job_runner_name is None or (job.job_runner_name is not None and job.job_runner_external_id is None): + if job.job_runner_name is None: + log.debug( "(%s) No job runner assigned and job still in '%s' state, adding to the job handler queue" % ( job.id, job.state ) ) + else: + log.debug( "(%s) Job runner assigned but no external ID recorded, adding to the job handler queue" % job.id ) if self.track_jobs_in_database: job.state = model.Job.states.NEW else: @@ -133,7 +136,7 @@ .join(model.HistoryDatasetAssociation) \ .join(model.Dataset) \ .filter(and_((model.Job.state == model.Job.states.NEW), - or_((model.HistoryDatasetAssociation._state != None), + or_((model.HistoryDatasetAssociation._state == model.HistoryDatasetAssociation.states.FAILED_METADATA), (model.HistoryDatasetAssociation.deleted == True ), (model.Dataset.state != model.Dataset.states.OK ), (model.Dataset.deleted == True)))).subquery() 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.