Fix wait, add back crawl command

This commit is contained in:
Richard Patel
2018-11-17 00:49:09 +01:00
parent cc777bcaeb
commit 145d37f84a
3 changed files with 53 additions and 4 deletions

View File

@@ -105,7 +105,6 @@ func DoJob(job *Job, f *File) (newJobs []Job, err error) {
}
lastLink = uriStr
job.OD.Wait.Add(1)
newJobs = append(newJobs, Job{
OD: job.OD,
Uri: link,
@@ -143,11 +142,10 @@ func (w WorkerContext) queueJob(job Job) {
} else {
time.Sleep(time.Duration(math.Sqrt(float64(50 * w.numRateLimits))) *
100 * time.Millisecond)
w.in <- job
}
} else {
w.in <- job
}
w.in <- job
}
func (w WorkerContext) finishJob(job *Job) {