Skip to content
This repository has been archived by the owner on Feb 6, 2022. It is now read-only.

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
simcasmse committed May 18, 2018
1 parent 5c137d7 commit d52f88d
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions Projet/cleanner/batchProcess.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ func main() {
wg.Add(1)
go bb(session, i, size, &wg)
}

wg.Wait()
}

Expand All @@ -62,7 +61,6 @@ func bb(session *mgo.Session, i int, size int, wg *sync.WaitGroup) {
processDate(articles[a], bulk)
}
bulk.Run()

}

func process(article *Article, bulk *mgo.Bulk) {
Expand All @@ -72,7 +70,6 @@ func process(article *Article, bulk *mgo.Bulk) {
doc.Find("p").Each(func(i int, el *goquery.Selection) {
text += strings.TrimSpace(el.Text())
})
text = strings.TrimSpace(text)
article.ClearedHTML = text
bulk.Update(bson.M{"_id": article.Id}, bson.M{"$set": bson.M{"clearedHTML": article.ClearedHTML}})
}
Expand Down

0 comments on commit d52f88d

Please sign in to comment.