Skip to content

Commit

Permalink
fix: add sleep after failed download attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
Karrenbelt committed Dec 20, 2022
1 parent b9b037e commit 152ff89
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugins/aea-cli-ipfs/aea_cli_ipfs/ipfs_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import signal
import subprocess # nosec
import tempfile
import time
from pathlib import Path
from typing import Dict, IO, List, Optional, Set, Tuple, cast

Expand Down Expand Up @@ -339,6 +340,7 @@ def download(
break
except ipfshttpclient.exceptions.StatusError as e:
logging.error(f"error on download of {hash_id}: {e}")
time.sleep(1)
else:
raise DownloadError(f"Failed to download: {hash_id}")

Expand Down

0 comments on commit 152ff89

Please sign in to comment.