From fdfde23c04e5cb6cad1c62cb259394539a18bf74 Mon Sep 17 00:00:00 2001 From: David McFadzean Date: Fri, 13 Oct 2023 16:25:34 -0400 Subject: [PATCH] Added configurable timeout to IPFS --- archiver/ipfs.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/archiver/ipfs.py b/archiver/ipfs.py index 5f50c59..ed27c26 100644 --- a/archiver/ipfs.py +++ b/archiver/ipfs.py @@ -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)