mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 07:47:49 +00:00
Emit restart events for Job and Tunnel.
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user