Reset jobs when tunnel restarts.

This commit is contained in:
John-David Dalton
2014-05-02 11:24:53 -07:00
parent a814c6d152
commit 7dcb56ea5c

View File

@@ -579,6 +579,11 @@ function Tunnel(properties) {
this.on('stop', function() {
completed = 0;
success = true;
_.each(all, function(job) {
job.attempts = 0;
job.failed = false;
job.id = job.result = job.url = null;
});
});
this.jobs = {'active': active, 'all': all, 'queue': queue };