Skip to content

Commit

Permalink
increases timeout for ipfs fetch
Browse files Browse the repository at this point in the history
- the ipfs-pinner now has a http gateway roster which it goes
  through finding which gateway can fetch content in reasonable
  time. The timeout here needs to be big enough to allow going
  through the roster.
  • Loading branch information
sudeepdino008 committed Feb 28, 2023
1 parent 2f20318 commit 5ec6fd0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rudder/ipfs/ipfs_interactor.ex
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ defmodule Rudder.IPFSInteractor do

{:ok, %Finch.Response{body: body, headers: _, status: _}} =
Finch.build(:get, "#{ipfs_url}/get?cid=#{cid}")
|> Finch.request(Rudder.Finch, receive_timeout: 120_000_000, pool_timeout: 120_000_000)
|> Finch.request(Rudder.Finch, receive_timeout: 150_000_000, pool_timeout: 150_000_000)

end_fetch_ms = System.monotonic_time(:millisecond)
Events.ipfs_fetch(end_fetch_ms - start_fetch_ms)
Expand Down

0 comments on commit 5ec6fd0

Please sign in to comment.