Add bandwidth tracking
This commit is contained in:
@@ -102,7 +102,11 @@ func MainApp(configPath string) {
|
||||
log.Named("download_client"),
|
||||
)
|
||||
|
||||
workerPool, err := ants.NewPool(config.GetNumberOfWorkers())
|
||||
workerCount := config.GetNumberOfWorkers()
|
||||
if workerCount < 10 {
|
||||
workerCount = 10
|
||||
}
|
||||
workerPool, err := ants.NewPool(workerCount)
|
||||
if err != nil {
|
||||
zurglog.Errorf("Failed to create worker pool: %v", err)
|
||||
os.Exit(1)
|
||||
@@ -140,7 +144,7 @@ func MainApp(configPath string) {
|
||||
log.Named("repair"),
|
||||
)
|
||||
|
||||
downloader := universal.NewDownloader(downloadClient)
|
||||
downloader := universal.NewDownloader(downloadClient, workerPool)
|
||||
|
||||
router := chi.NewRouter()
|
||||
handlers.AttachHandlers(
|
||||
|
||||
Reference in New Issue
Block a user