set infinity timeout for addresses without code

pull/1623/head
Ayrat Badykov 6 years ago
parent 318bd429d2
commit 1ce53363e5
No known key found for this signature in database
GPG Key ID: B44668E265E9396F
  1. 3
      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] @task_options [max_concurrency: 3, timeout: :infinity]
@batch_size 500 @batch_size 500
@query_timeout :infinity
def start_link([fetcher, gen_server_options]) do def start_link([fetcher, gen_server_options]) do
GenServer.start_link(__MODULE__, fetcher, gen_server_options) GenServer.start_link(__MODULE__, fetcher, gen_server_options)
@ -104,7 +105,7 @@ defmodule Indexer.Temporary.AddressesWithoutCode do
end end
defp process_query(query, fetcher) do 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 = stream =
TaskSupervisor TaskSupervisor

Loading…
Cancel
Save