try to fix pro-rata yet again
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Nathan Coad
2026-01-27 09:09:24 +11:00
parent 73ec80bb6f
commit 35b4a50cf6
4 changed files with 75 additions and 10 deletions

View File

@@ -158,6 +158,9 @@ func (c *CronTask) aggregateDailySummary(ctx context.Context, targetTime time.Ti
if err := db.RefineCreationDeletionFromUnion(ctx, dbConn, summaryTable, unionQuery); err != nil {
c.Logger.Warn("failed to refine creation/deletion times", "error", err, "table", summaryTable)
}
if err := db.UpdateSummaryPresenceByWindow(ctx, dbConn, summaryTable, dayStart.Unix(), dayEnd.Unix()); err != nil {
c.Logger.Warn("failed to update daily AvgIsPresent from lifecycle window", "error", err, "table", summaryTable)
}
analyzeStart := time.Now()
c.Logger.Debug("Analyzing daily summary table", "table", summaryTable)
db.AnalyzeTableIfPostgres(ctx, dbConn, summaryTable)
@@ -402,6 +405,9 @@ LIMIT 1
} else {
c.Logger.Debug("refined creation/deletion times", "table", summaryTable)
}
if err := db.UpdateSummaryPresenceByWindow(ctx, dbConn, summaryTable, dayStart.Unix(), dayEnd.Unix()); err != nil {
c.Logger.Warn("failed to update daily AvgIsPresent from lifecycle window (Go path)", "error", err, "table", summaryTable)
}
analyzeStart := time.Now()
c.Logger.Debug("Analyzing daily summary table", "table", summaryTable)