Skip to content

Commit 2846865

Browse files
committed
dont log dupe detecting query
1 parent 0974fb2 commit 2846865

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Diff for: main.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,11 @@ func indexContacts(db *sql.DB, elasticURL string, index string, lastModified tim
299299
batch.Reset()
300300
}
301301

302+
// didn't add anything in this batch and our last modified stayed the same, seen it all, break out
303+
if batchCount == 0 && lastModified.Equal(batchModified) {
304+
break
305+
}
306+
302307
elapsed := time.Now().Sub(start)
303308
rate := float32(processedCount) / (float32(elapsed) / float32(time.Second))
304309
log.WithFields(map[string]interface{}{
@@ -308,11 +313,6 @@ func indexContacts(db *sql.DB, elasticURL string, index string, lastModified tim
308313
"elapsed": elapsed,
309314
"index": index}).Info("updated contact index")
310315

311-
// didn't add anything in this batch and our last modified stayed the same, seen it all, break out
312-
if batchCount == 0 && lastModified.Equal(batchModified) {
313-
break
314-
}
315-
316316
rows.Close()
317317
}
318318

0 commit comments

Comments
 (0)