Add alternate downloader

That works a lot faster, pog
This commit is contained in:
2024-11-05 15:36:08 +01:00
parent 7c02cbf0e4
commit f5c072360b
6 changed files with 162 additions and 8 deletions

View File

@@ -35,7 +35,7 @@ func init() {
log.Lmicroseconds|log.Lshortfile)
}
const DOWNLOAD_WORKERS = 4
const DOWNLOAD_WORKERS = 1
type DLHandler struct{}
@@ -65,7 +65,7 @@ func (*DLHandler) HandleMessage(message *nsq.Message) error {
}
}()
err = Download(data.Link)
err = DownloadR(data.Link)
if err != nil {
Error.Printf("Error downloading %s: %v", data.Link, err)
return err