add delta sync before each reconcile, have it not repeat if it's been done in the last minute
This commit is contained in:
parent
ccb6b3277d
commit
f98a23418f
3 changed files with 22 additions and 0 deletions
|
|
@ -6,6 +6,9 @@ import (
|
|||
)
|
||||
|
||||
func (s *Server) reconcile(ctx context.Context, runID int64, rep *User, dept string) error {
|
||||
if err := s.syncIfStale(ctx, time.Minute); err != nil {
|
||||
log.Printf("run %d: pre-run sync failed, using cached roster: %v", runID, err)
|
||||
}
|
||||
reps, err := s.store.RepsFor(rep.ChapterID, dept)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue