Handle HTTP statuses

This commit is contained in:
Richard Patel
2018-10-28 03:22:25 +01:00
parent 1c33346f45
commit 4ea5f8a410
2 changed files with 25 additions and 9 deletions

View File

@@ -31,11 +31,6 @@ func (w WorkerContext) step(job Job) {
if err != nil {
job.Fails++
logrus.WithFields(logrus.Fields{
"error": err.Error(),
"url": job.UriStr,
}).Warningf("Crawl error: %s", err)
if job.Fails > config.Retries {
atomic.AddUint64(&totalAborted, 1)
logrus.WithField("url", job.UriStr).