Emit restart events for Job and Tunnel.

This commit is contained in:
John-David Dalton
2014-05-03 21:28:19 -07:00
parent fb20dae0a8
commit 3de50e8dd4

View File

@@ -510,7 +510,9 @@ Job.prototype.restart = function(callback) {
logInline();
console.log(label + ' ' + description + ' restart #%d of %d', ++this.attempts, this.retries);
_.defer(_.bind(this.emit, this, 'restart'));
this.stop(_.partial(this.start, callback));
return this;
};
@@ -661,7 +663,9 @@ Tunnel.prototype.restart = function(callback) {
logInline();
console.log('Tunnel ' + this.id + ': restart #%d of %d', ++this.attempts, this.retries);
_.defer(_.bind(this.emit, this, 'restart'));
this.stop(_.partial(this.start, callback));
return this;
};