Merge pull request #3533 from poanetwork/vb-token-balance-on-demand-fetcher-in-parallel

Run token balance on-demand fetcher in parallel
pull/3536/head
Victor Baranov 4 years ago committed by GitHub
commit ba0a947179
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      CHANGELOG.md
  2. 4
      apps/block_scout_web/lib/block_scout_web/controllers/address_token_balance_controller.ex
  3. 2
      apps/indexer/lib/indexer/fetcher/token_balance_on_demand.ex

@ -12,7 +12,7 @@
### Fixes
- [#3530](https://github.com/poanetwork/blockscout/pull/3530) - Allow trailing/leading whitespaces for inputs for contract read methods
- [#3526](https://github.com/poanetwork/blockscout/pull/3526) - Order staking pools
- [#3525](https://github.com/poanetwork/blockscout/pull/3525) - Address token balance on demand fetcher
- [#3525](https://github.com/poanetwork/blockscout/pull/3525), [#3533](https://github.com/poanetwork/blockscout/pull/3533) - Address token balance on demand fetcher
- [#3514](https://github.com/poanetwork/blockscout/pull/3514) - Read contract: fix internal server error
- [#3513](https://github.com/poanetwork/blockscout/pull/3513) - Fix input data processing for method call (array type of data)
- [#3509](https://github.com/poanetwork/blockscout/pull/3509) - Fix QR code tooltip appearance in mobile view

@ -14,7 +14,9 @@ defmodule BlockScoutWeb.AddressTokenBalanceController do
|> Chain.fetch_last_token_balances()
|> Market.add_price()
TokenBalanceOnDemand.trigger_fetch(address_hash, token_balances)
Task.start_link(fn ->
TokenBalanceOnDemand.trigger_fetch(address_hash, token_balances)
end)
circles_addresses_list = CustomContractsHelpers.get_custom_addresses_list(:circles_addresses)

@ -65,8 +65,6 @@ defmodule Indexer.Fetcher.TokenBalanceOnDemand do
if Enum.count(stale_current_token_balances) > 0 do
GenServer.cast(__MODULE__, {:fetch_and_update, latest_block_number, address_hash, stale_current_token_balances})
{:stale, latest_block_number}
else
:current
end

Loading…
Cancel
Save