Skip to content

Commit

Permalink
Merge pull request #2506 from carlfeberhard/twice-a-day
Browse files Browse the repository at this point in the history
[16.04] UI, history: backport of 3672eda
  • Loading branch information
martenson committed Jun 16, 2016
2 parents f3f0c30 + c8af300 commit 70b4097
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 9 deletions.
12 changes: 9 additions & 3 deletions client/galaxy/scripts/mvc/history/history-model.js
Expand Up @@ -172,10 +172,16 @@ var History = Backbone.Model
var self = this;

var lastUpdateTime = self.lastUpdateTime;
self.lastUpdateTime = new Date();
// note if there was no previous update time, all summary contents will be fetched
// note: if there was no previous update time, all summary contents will be fetched
return self.contents.fetchUpdated( lastUpdateTime )
.done( _.bind( self.checkForUpdates, self ) );
.done( function( response, status, xhr ){
var serverResponseDatetime;
try {
serverResponseDatetime = new Date( xhr.getResponseHeader( 'Date' ) );
} catch( err ){}
self.lastUpdateTime = serverResponseDatetime || new Date();
self.checkForUpdates( options );
});
},

/** */
Expand Down

0 comments on commit 70b4097

Please sign in to comment.