From 2414b2077f07aa48f1515aa31e24e2ed8d54c4e7 Mon Sep 17 00:00:00 2001 From: rouggy Date: Tue, 8 Sep 2026 00:19:12 +0200 Subject: [PATCH] chore(awards): log a successful bulk recompute, not only a failed one MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "I changed an award and the column stayed empty" cannot be answered without knowing whether the recompute ran at all, how long it took, and whether it changed anything — and zero rows changed is a real answer (the definition matches nothing in the log) that looks exactly like a recompute which never happened. --- app.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app.go b/app.go index d899dda..5173745 100644 --- a/app.go +++ b/app.go @@ -5612,11 +5612,19 @@ func (a *App) recomputeAwardRefsForCodesAsync(codes []string) { // definition / reference-list change, or a bulk ADIF import. func (a *App) recomputeAwardRefsAsync() { go func() { + t0 := time.Now() n, err := a.RecomputeAllAwardRefs() if err != nil { applog.Printf("award_refs: bulk recompute failed: %v", err) return } + // Logged on SUCCESS too, and this is why: "I changed an award and the + // column stayed empty" is unanswerable without knowing whether the + // recompute ran at all, how long it took, and whether it changed + // anything. Zero rows changed is a real answer — the definition matches + // nothing in the log — and it looks exactly like a recompute that never + // happened. + applog.Printf("award_refs: bulk recompute done — %d rows changed in %s", n, time.Since(t0).Round(time.Millisecond)) if a.ctx != nil { wruntime.EventsEmit(a.ctx, "awards:recomputed", n) }