cool bug fixes

This commit is contained in:
TJ Horner 2019-02-28 16:29:47 -08:00
parent 851a20dbfa
commit 43c8a67e6f
1 changed files with 4 additions and 0 deletions

View File

@ -7,6 +7,7 @@ import (
"strconv"
"strings"
"sync"
"time"
"github.com/dustin/go-humanize"
)
@ -39,6 +40,9 @@ func BeginDownload(posts *[]Post, saveDirectory *string, maxConcurrents *int) (*
wg.Add(1)
go work(i+1, (*posts)[postsLower:postsUpper], *saveDirectory, &completed, &successes, &failures, &total, &wg)
// Spawn workers with a little bit of a delay so as to not DDOS e621
// but also make the initial numbers show up correctly
time.Sleep(50 * time.Millisecond)
}
wg.Wait()