mirror of
https://codeberg.org/scip/kleingebaeck.git
synced 2025-12-16 20:11:01 +01:00
add throttling to image download
This commit is contained in:
5
main.go
5
main.go
@@ -22,8 +22,10 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"log/slog"
|
||||
"math/rand"
|
||||
"os"
|
||||
"runtime/debug"
|
||||
"time"
|
||||
|
||||
"github.com/lmittmann/tint"
|
||||
"github.com/tlinden/yadu"
|
||||
@@ -113,6 +115,9 @@ func Main(w io.Writer) int {
|
||||
// used for all HTTP requests
|
||||
fetch := NewFetcher(conf)
|
||||
|
||||
// randomization needed here and there
|
||||
rand.Seed(time.Now().UnixNano())
|
||||
|
||||
if len(conf.Adlinks) >= 1 {
|
||||
// directly backup ad listing[s]
|
||||
for _, uri := range conf.Adlinks {
|
||||
|
||||
Reference in New Issue
Block a user