Add more logging
This commit is contained in:
parent
e8eb418e0b
commit
f00529bb58
1 changed files with 3 additions and 0 deletions
|
@ -93,6 +93,7 @@ func scrapeVideos(b *beat.Beat, bt *Youtubebeat, done chan bool) {
|
||||||
|
|
||||||
videoCollector.Visit(BaseUrl + BaseSuffix + bt.config.StartId)
|
videoCollector.Visit(BaseUrl + BaseSuffix + bt.config.StartId)
|
||||||
videoCollector.Wait()
|
videoCollector.Wait()
|
||||||
|
logp.Info("Done parsing all videos")
|
||||||
done <- true
|
done <- true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -111,8 +112,10 @@ func (bt *Youtubebeat) Run(b *beat.Beat) error {
|
||||||
|
|
||||||
select {
|
select {
|
||||||
case <-done:
|
case <-done:
|
||||||
|
logp.Info("Exiting on done parsing")
|
||||||
return nil
|
return nil
|
||||||
case <-bt.done:
|
case <-bt.done:
|
||||||
|
logp.Info("Exiting on beat stop signal")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue