From 43c8a67e6fd27882e5a00270a3c24d29e2b7159f Mon Sep 17 00:00:00 2001 From: TJ Horner Date: Thu, 28 Feb 2019 16:29:47 -0800 Subject: [PATCH] cool bug fixes --- src/download.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/download.go b/src/download.go index 8d70a1d..55f7796 100644 --- a/src/download.go +++ b/src/download.go @@ -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()