add better logging for failures
This commit is contained in:
parent
54f1186498
commit
398d372b50
1 changed files with 4 additions and 3 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue