Skip to content

Commit

Permalink
wait to print summary message in case more log events are queued
Browse files Browse the repository at this point in the history
  • Loading branch information
briskt committed Oct 9, 2024
1 parent 29415c4 commit be74048
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/internal.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,6 @@ func RunSyncSet(logger *log.Logger, source Source, destination Destination, conf

results := destination.ApplyChangeSet(changeSet, eventLog)

logger.Printf("Sync results: %v users added, %v users updated, %v users removed\n",
results.Created, results.Updated, results.Deleted)

for i := 0; i < 100; i++ {
time.Sleep(time.Millisecond * 10)
if len(eventLog) == 0 {
Expand All @@ -235,6 +232,9 @@ func RunSyncSet(logger *log.Logger, source Source, destination Destination, conf
}
close(eventLog)

logger.Printf("Sync results: %v users added, %v users updated, %v users removed\n",
results.Created, results.Updated, results.Deleted)

return nil
}

Expand Down

0 comments on commit be74048

Please sign in to comment.