Skip to content

Commit

Permalink
dont log dupe detecting query
Browse files Browse the repository at this point in the history
  • Loading branch information
nicpottier committed Mar 27, 2018
1 parent 0974fb2 commit 2846865
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,11 @@ func indexContacts(db *sql.DB, elasticURL string, index string, lastModified tim
batch.Reset()
}

// didn't add anything in this batch and our last modified stayed the same, seen it all, break out
if batchCount == 0 && lastModified.Equal(batchModified) {
break
}

elapsed := time.Now().Sub(start)
rate := float32(processedCount) / (float32(elapsed) / float32(time.Second))
log.WithFields(map[string]interface{}{
Expand All @@ -308,11 +313,6 @@ func indexContacts(db *sql.DB, elasticURL string, index string, lastModified tim
"elapsed": elapsed,
"index": index}).Info("updated contact index")

// didn't add anything in this batch and our last modified stayed the same, seen it all, break out
if batchCount == 0 && lastModified.Equal(batchModified) {
break
}

rows.Close()
}

Expand Down

0 comments on commit 2846865

Please sign in to comment.