mirror of
https://github.com/terorie/od-database-crawler.git
synced 2025-04-24 12:55:51 +00:00
Limit retries to 10
This commit is contained in:
parent
1625d6c888
commit
d332f06659
@ -102,9 +102,8 @@ func uploadChunks(websiteId uint64, f *os.File) error {
|
|||||||
|
|
||||||
multi.Close()
|
multi.Close()
|
||||||
|
|
||||||
for retried := false; true; retried = true {
|
for retries := 0; retries < 10; retries++ {
|
||||||
err = nil
|
if retries > 0 {
|
||||||
if retried {
|
|
||||||
// Error occurred, retry upload
|
// Error occurred, retry upload
|
||||||
time.Sleep(5 * time.Second)
|
time.Sleep(5 * time.Second)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user