Skip to content

Commit

Permalink
Fixed bug where "Run Again" button could sometimes freeze up UI if jo…
Browse files Browse the repository at this point in the history
…b completed immediately.

Bumped version to 0.2.1.
  • Loading branch information
jhuckaby committed Apr 5, 2016
1 parent 4fef7db commit 5317b06
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion htdocs/js/pages/JobDetails.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ Class.subclass( Page.Base, "Page.JobDetails", {
app.api.post( 'app/run_event', job, function(resp) {
// app.showMessage('success', "Event '"+event.title+"' has been started.");
self.jump_live_job_id = resp.ids[0];
self.jump_live_time_start = hires_time_now();
self.jump_to_live_when_ready();
} );
},
Expand All @@ -129,10 +130,11 @@ Class.subclass( Page.Base, "Page.JobDetails", {
var self = this;
if (!this.active) return; // user navigated away from page

if (app.activeJobs[this.jump_live_job_id]) {
if (app.activeJobs[this.jump_live_job_id] || ((hires_time_now() - this.jump_live_time_start) >= 3.0)) {
app.hideProgress();
Nav.go( 'JobDetails?id=' + this.jump_live_job_id );
delete this.jump_live_job_id;
delete this.jump_live_time_start;
}
else {
setTimeout( self.jump_to_live_when_ready.bind(self), 250 );
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Cronicle",
"version": "0.2.0",
"version": "0.2.1",
"description": "A simple, distributed task scheduler and runner with a web based UI.",
"author": "Joseph Huckaby <[email protected]>",
"homepage": "https://github.com/jhuckaby/Cronicle",
Expand Down

0 comments on commit 5317b06

Please sign in to comment.