improve logging and concurrent vcenter inventory
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2026-01-21 10:25:04 +11:00
parent 00805513c9
commit 2483091861
5 changed files with 115 additions and 55 deletions

View File

@@ -169,6 +169,9 @@ func (c *CronTask) aggregateDailySummary(ctx context.Context, targetTime time.Ti
metrics.RecordDailyAggregation(time.Since(jobStart), err)
return err
}
if err := db.CheckpointSQLite(ctx, dbConn); err != nil {
c.Logger.Warn("failed to checkpoint sqlite after daily aggregation", "error", err)
}
c.Logger.Debug("Finished daily inventory aggregation", "summary_table", summaryTable)
metrics.RecordDailyAggregation(time.Since(jobStart), nil)
@@ -370,6 +373,9 @@ LIMIT 1
c.Logger.Warn("failed to generate daily report", "error", err, "table", summaryTable)
return err
}
if err := db.CheckpointSQLite(ctx, dbConn); err != nil {
c.Logger.Warn("failed to checkpoint sqlite after daily aggregation (Go path)", "error", err)
}
c.Logger.Debug("Finished daily inventory aggregation (Go path)",
"summary_table", summaryTable,