Skip to content

Commit

Permalink
Fix other node endpoints calls (#2070)
Browse files Browse the repository at this point in the history
Co-authored-by: Saliou Diallo <saliou@audius.co>
  • Loading branch information
sddioulde and Saliou Diallo committed Nov 15, 2021
1 parent c538f27 commit b0d44f2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def confirm_indexing_transaction_error(
Gets all other discovery nodes and makes an api call to check the status of a transaction
given a blocknumber, blockhash, and transactionhash
"""
all_other_nodes = get_all_other_nodes()
all_other_nodes = get_all_other_nodes()[0]
num_other_nodes = len(all_other_nodes)
num_transaction_failures = 0
for node in all_other_nodes:
Expand Down
5 changes: 3 additions & 2 deletions discovery-provider/src/tasks/index_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def consolidate_metrics_from_other_nodes(self, db, redis):
and merge with this node's metrics so that this node will be aware
of all the metrics across users hitting different providers
"""
all_other_nodes = get_all_other_nodes()
all_other_nodes = get_all_other_nodes()[0]

visited_node_timestamps_str = redis_get_or_restore(redis, metrics_visited_nodes)
visited_node_timestamps = (
Expand Down Expand Up @@ -360,7 +360,8 @@ def synchronize_all_node_metrics(self, db):
monthly_route_metrics = {}
daily_app_metrics = {}
monthly_app_metrics = {}
for node in get_all_other_nodes():
all_other_nodes = get_all_other_nodes()[0]
for node in all_other_nodes:
historical_metrics = get_historical_metrics(node)
logger.info(f"got historical metrics from {node}: {historical_metrics}")
if historical_metrics:
Expand Down

0 comments on commit b0d44f2

Please sign in to comment.