Skip to content

Commit

Permalink
chore: add IPFS retries count
Browse files Browse the repository at this point in the history
  • Loading branch information
madlabman committed May 10, 2024
1 parent 28b214e commit eded552
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ def main(module_name: OracleModule):
kac = KeysAPIClientModule(variables.KEYS_API_URI, web3)

logger.info({'msg': 'Initialize IPFS providers.'})
ipfs = MultiIPFSProvider(ipfs_providers())
ipfs = MultiIPFSProvider(
ipfs_providers(),
retries=variables.HTTP_REQUEST_RETRY_COUNT_IPFS,
)

logger.info({'msg': 'Check configured providers.'})
check_providers_chain_ids(web3, cc, kac)
Expand Down
1 change: 1 addition & 0 deletions src/variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
)

HTTP_REQUEST_TIMEOUT_IPFS = int(os.getenv('HTTP_REQUEST_TIMEOUT_IPFS', 30))
HTTP_REQUEST_RETRY_COUNT_IPFS = int(os.getenv('HTTP_REQUEST_RETRY_COUNT_IPFS', 3))

# - Metrics -
PROMETHEUS_PORT = int(os.getenv('PROMETHEUS_PORT', 9000))
Expand Down

0 comments on commit eded552

Please sign in to comment.