mirror of
https://github.com/terorie/od-database-crawler.git
synced 2025-04-20 02:46:43 +00:00
Fix segfault
This commit is contained in:
parent
d69cd4400e
commit
c72f4ba475
@ -22,17 +22,16 @@ func Schedule(c context.Context, remotes <-chan *OD) {
|
|||||||
go Stats(c)
|
go Stats(c)
|
||||||
|
|
||||||
for remote := range remotes {
|
for remote := range remotes {
|
||||||
|
// Create HTTP client
|
||||||
|
remote.WCtx.OD = remote
|
||||||
|
remote.WCtx.Prepare()
|
||||||
|
|
||||||
logrus.WithField("url", remote.BaseUri.String()).
|
logrus.WithField("url", remote.BaseUri.String()).
|
||||||
Info("Starting crawler")
|
Info("Starting crawler")
|
||||||
|
|
||||||
// Create HTTP client
|
|
||||||
remote.WCtx.Prepare()
|
|
||||||
|
|
||||||
// Collect results
|
// Collect results
|
||||||
results := make(chan File)
|
results := make(chan File)
|
||||||
|
|
||||||
remote.WCtx.OD = remote
|
|
||||||
|
|
||||||
// Get queue path
|
// Get queue path
|
||||||
queuePath := path.Join("queue", fmt.Sprintf("%d", remote.Task.WebsiteId))
|
queuePath := path.Join("queue", fmt.Sprintf("%d", remote.Task.WebsiteId))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user