From 52fdcc64ef4bab6d0236ab29b19a12bbc8043114 Mon Sep 17 00:00:00 2001 From: PhatPhuckDave Date: Tue, 5 Nov 2024 15:58:44 +0100 Subject: [PATCH] Shorter timeout --- downloader/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/downloader/main.go b/downloader/main.go index cfdafbb..34f4107 100644 --- a/downloader/main.go +++ b/downloader/main.go @@ -35,7 +35,7 @@ func init() { log.Lmicroseconds|log.Lshortfile) } -const DOWNLOAD_WORKERS = 1 +const DOWNLOAD_WORKERS = 2 type DLHandler struct{} @@ -52,7 +52,7 @@ func (*DLHandler) HandleMessage(message *nsq.Message) error { defer cancel() go func() { - ticker := time.NewTicker(5 * time.Second) + ticker := time.NewTicker(1 * time.Second) defer ticker.Stop() for {