Skip to content

Commit

Permalink
Merge pull request #964 from gobitfly/BEDS-629/use_max_ts_tables
Browse files Browse the repository at this point in the history
fix(dashboard): use max_ts tables for retrieving last exported chart ts
  • Loading branch information
peterbitfly authored Oct 16, 2024
2 parents f690a8d + 222064c commit 32e66e4
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions backend/pkg/api/data_access/vdb_summary.go
Original file line number Diff line number Diff line change
Expand Up @@ -1093,17 +1093,17 @@ func (d *DataAccessService) GetLatestExportedChartTs(ctx context.Context, aggreg
var dateColumn string
switch aggregation {
case enums.IntervalEpoch:
table = "validator_dashboard_data_epoch"
dateColumn = "epoch_timestamp"
table = "view_validator_dashboard_data_epoch_max_ts"
dateColumn = "t"
case enums.IntervalHourly:
table = "validator_dashboard_data_hourly"
dateColumn = "hour"
table = "view_validator_dashboard_data_hourly_max_ts"
dateColumn = "t"
case enums.IntervalDaily:
table = "validator_dashboard_data_daily"
dateColumn = "day"
table = "view_validator_dashboard_data_daily_max_ts"
dateColumn = "t"
case enums.IntervalWeekly:
table = "validator_dashboard_data_weekly"
dateColumn = "week"
table = "view_validator_dashboard_data_weekly_max_ts"
dateColumn = "t"
default:
return 0, fmt.Errorf("unexpected aggregation type: %v", aggregation)
}
Expand Down

0 comments on commit 32e66e4

Please sign in to comment.