Merge pull request #3448 from poanetwork/vb-token-infinite-timeout

Inifinite timeout for token counters
pull/3449/head
Victor Baranov 4 years ago committed by GitHub
commit a19fe18974
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      CHANGELOG.md
  2. 2
      apps/explorer/lib/explorer/chain.ex
  3. 4
      apps/explorer/lib/explorer/chain/token_transfer.ex

@ -49,7 +49,7 @@
- [#3335](https://github.com/poanetwork/blockscout/pull/3335) - MarketCap calculation: check that ETS tables exist before inserting new data or lookup from the table - [#3335](https://github.com/poanetwork/blockscout/pull/3335) - MarketCap calculation: check that ETS tables exist before inserting new data or lookup from the table
### Chore ### Chore
- [#3446](https://github.com/poanetwork/blockscout/pull/3446) - Set infinity timeout and increase cache invalidation period for counters on the main page - [#3446](https://github.com/poanetwork/blockscout/pull/3446), [#3448](https://github.com/poanetwork/blockscout/pull/3448) - Set infinity timeout and increase cache invalidation period for counters
- [#3431](https://github.com/poanetwork/blockscout/pull/3431) - Standardize token name definition, if name is empty - [#3431](https://github.com/poanetwork/blockscout/pull/3431) - Standardize token name definition, if name is empty
- [#3421](https://github.com/poanetwork/blockscout/pull/3421) - Functions to enable GnosisSafe app link - [#3421](https://github.com/poanetwork/blockscout/pull/3421) - Functions to enable GnosisSafe app link
- [#3414](https://github.com/poanetwork/blockscout/pull/3414) - Manage lis of other explorers in the footer via env var - [#3414](https://github.com/poanetwork/blockscout/pull/3414) - Manage lis of other explorers in the footer via env var

@ -4567,7 +4567,7 @@ defmodule Explorer.Chain do
def count_token_holders_from_token_hash(contract_address_hash) do def count_token_holders_from_token_hash(contract_address_hash) do
query = from(ctb in CurrentTokenBalance.token_holders_query(contract_address_hash), select: fragment("COUNT(*)")) query = from(ctb in CurrentTokenBalance.token_holders_query(contract_address_hash), select: fragment("COUNT(*)"))
Repo.one!(query) Repo.one!(query, timeout: :infinity)
end end
@spec address_to_unique_tokens(Hash.Address.t(), [paging_options]) :: [TokenTransfer.t()] @spec address_to_unique_tokens(Hash.Address.t(), [paging_options]) :: [TokenTransfer.t()]

@ -186,7 +186,7 @@ defmodule Explorer.Chain.TokenTransfer do
select: fragment("COUNT(*)") select: fragment("COUNT(*)")
) )
Repo.one(query) Repo.one(query, timeout: :infinity)
end end
@spec count_token_transfers_from_token_hash_and_token_id(Hash.t(), binary()) :: non_neg_integer() @spec count_token_transfers_from_token_hash_and_token_id(Hash.t(), binary()) :: non_neg_integer()
@ -198,7 +198,7 @@ defmodule Explorer.Chain.TokenTransfer do
select: fragment("COUNT(*)") select: fragment("COUNT(*)")
) )
Repo.one(query) Repo.one(query, timeout: :infinity)
end end
def page_token_transfer(query, %PagingOptions{key: nil}), do: query def page_token_transfer(query, %PagingOptions{key: nil}), do: query

Loading…
Cancel
Save