Merge pull request #1623 from poanetwork/ab-set-infinity-timeout-for-addresses-without-code-query

infinity timeout for addresses without code query
pull/1608/head
Victor Baranov 6 years ago committed by GitHub
commit a2741ea070
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      apps/indexer/lib/indexer/temporary/addresses_without_code.ex

@ -16,6 +16,7 @@ defmodule Indexer.Temporary.AddressesWithoutCode do
@task_options [max_concurrency: 3, timeout: :infinity]
@batch_size 500
@query_timeout :infinity
def start_link([fetcher, gen_server_options]) do
GenServer.start_link(__MODULE__, fetcher, gen_server_options)
@ -104,7 +105,7 @@ defmodule Indexer.Temporary.AddressesWithoutCode do
end
defp process_query(query, fetcher) do
query_stream = Repo.stream(query, max_rows: @batch_size)
query_stream = Repo.stream(query, max_rows: @batch_size, timeout: @query_timeout)
stream =
TaskSupervisor
@ -114,7 +115,7 @@ defmodule Indexer.Temporary.AddressesWithoutCode do
@task_options
)
Repo.transaction(fn -> Stream.run(stream) end)
Repo.transaction(fn -> Stream.run(stream) end, timeout: @query_timeout)
end
def refetch_block(block, fetcher) do

Loading…
Cancel
Save