Skip to content

Commit

Permalink
Fix summed unique metrics (#1383)
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 Apr 6, 2021
1 parent 1eb32f8 commit 1a699dc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion discovery-provider/src/tasks/index_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,10 @@ def consolidate_metrics_from_other_nodes(self, db, redis):

# add other nodes' summed unique daily and monthly counts to this node's
if new_route_metrics:
new_route_metrics = new_route_metrics['deduped']
logger.info(f"summed unique metrics from {node}: {new_route_metrics['summed']}")
summed_unique_daily_count += new_route_metrics['summed']['daily']
summed_unique_monthly_count += new_route_metrics['summed']['monthly']
new_route_metrics = new_route_metrics['deduped']

merge_route_metrics(new_route_metrics or {}, end_time, db)
merge_app_metrics(new_app_metrics or {}, end_time, db)
Expand Down

0 comments on commit 1a699dc

Please sign in to comment.