Skip to content

Commit

Permalink
update stats first
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Tahler committed Feb 2, 2013
1 parent 3185818 commit 6b28e89
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions initializers/taskProcessor.js
Expand Up @@ -146,12 +146,12 @@ var taskProcessor = function(api, next){
api.taskProcessor.prototype.prepareNextRun = function(callback){
var self = this;
self.currentTask = null;
if(self.running == true){
self.timer = setTimeout(function(){
self.process();
}, self.cycleTimeMS);
}
self.setWorkerStatus("idle", function(){
if(self.running == true){
self.timer = setTimeout(function(){
self.process();
}, self.cycleTimeMS);
}
if(typeof callback == "function"){ callback(); }
});
}
Expand Down

0 comments on commit 6b28e89

Please sign in to comment.