Skip to content

Commit

Permalink
Added configurable timeout to IPFS
Browse files Browse the repository at this point in the history
  • Loading branch information
macterra committed Oct 13, 2023
1 parent c07705c commit fdfde23
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion archiver/ipfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@

def getIpfs():
connect = os.environ.get('IPFS_CONNECT')
timeout = 5
timeout = int(os.environ.get('IPFS_TIMEOUT', 5))

print(f"connecting to IPFS {connect} with timeout={timeout}")

if connect:
return ipfshttpclient.connect(connect, timeout=timeout)
Expand Down

0 comments on commit fdfde23

Please sign in to comment.