Comparing version 0.8.5 to 0.8.6
@@ -76,3 +76,3 @@ | ||
this.on(JOB_END,function(gearmanJob,status,msg){ | ||
this.on(JOB_END,function(gearmanJob,status){ | ||
this.serverTasks.pop(); | ||
@@ -94,3 +94,3 @@ | ||
}else if(status === Status.failed ){ | ||
op.$set.cause = msg; | ||
op.$set.cause = gearmanJob.errorMsg; | ||
@@ -311,23 +311,24 @@ this.db.collection(this.name) | ||
objJob.on("warning",function(data){ | ||
logClient.warn(data.toString()); | ||
self.emit(JOB_END, objJob,Status.failed, data.toString()); | ||
logClient.debug(data.toString()); | ||
objJob.errorMsg = data.toString(); | ||
}); | ||
objJob.on("failed",function(){ | ||
logClient.warn("work failed") | ||
logClient.debug("work failed", objJob.jobVO); | ||
self.emit(JOB_END, objJob,Status.failed); | ||
}); | ||
// deprecated | ||
// objJob.on("exception",function(emsg){ | ||
// logClient.debug('job exception: %s',emsg); | ||
// self.emit(JOB_END,objJob,Status.failed,emsg.toString()); | ||
// }); | ||
objJob.on("exception",function(emsg){ | ||
logClient.error('job exception: %s',emsg); | ||
self.emit(JOB_END,objJob,Status.failed,emsg.toString()); | ||
}); | ||
objJob.on("error",function(e){ | ||
logClient.error('job error: %s',e); | ||
self.emit(JOB_END,objJob,Status.failed, e.stack); | ||
logClient.error('job error: %s',e.stack, objJob.jobVO); | ||
self.emit(JOB_END,objJob,Status.failed); | ||
}); | ||
objJob.on('timeout',function(){ | ||
logClient.error("time out"); | ||
logClient.error("time out", objJob.jobVO); | ||
self.emit(JOB_END,objJob,Status.failed); | ||
@@ -334,0 +335,0 @@ }); |
{ | ||
"name": "floodesh", | ||
"version": "0.8.5", | ||
"version": "0.8.6", | ||
"description": "Floodesh is a distributed web spider/crawler written with Nodejs.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
39535
1113