Reduce WaitQueue usage

This commit is contained in:
Richard Patel
2018-11-12 00:38:22 +01:00
parent 4c071171eb
commit a268c6dbcf
2 changed files with 2 additions and 3 deletions

View File

@@ -35,7 +35,6 @@ func Schedule(c context.Context, remotes <-chan *OD) {
UriStr: remote.BaseUri.String(),
Fails: 0,
})
globalWait.Done()
// Upload result when ready
go remote.Watch()
@@ -51,6 +50,8 @@ func (r *OD) Watch() {
logrus.WithField("url", r.BaseUri.String()).
Info("Crawler finished")
globalWait.Done()
}
func makeJobBuffer(c context.Context) (chan<- Job, <-chan Job) {