From 398d372b50e5957666f433d6461260229993e270 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milo=C5=A1=20Jovanovi=C4=87?= Date: Thu, 24 Sep 2026 20:29:55 -0700 Subject: [PATCH] add better logging for failures --- reconcile.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/reconcile.go b/reconcile.go index 9eb22fc..560e909 100644 --- a/reconcile.go +++ b/reconcile.go @@ -29,7 +29,7 @@ func (s *Server) reconcile(ctx context.Context, runID int64, rep *User, dept str } // loop - assigned, skipped, failed := 0, 0, 0 + assigned, skipped, failed := 0, 0, 0, 0 for i, m := range members { agent := reps[i%len(reps)] @@ -48,6 +48,7 @@ func (s *Server) reconcile(ctx context.Context, runID int64, rep *User, dept str } if existing == agent { + already++ continue // already assigned to the right rep } @@ -75,7 +76,7 @@ func (s *Server) reconcile(ctx context.Context, runID int64, rep *User, dept str log.Printf("WARNING: run %d: assigned nobody; all %d members already have agents", runID, skipped) } - log.Printf("run %d: %d assigned, %d skipped, dept %q chapter %d", - runID, assigned, skipped, dept, rep.ChapterID) + log.Printf("run %d: %d assigned, %d already correct, %d skipped, %d failed, dept %q chapter %d", + runID, assigned, already, skipped, failed, dept, rep.ChapterID) return nil }