Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
leo authored and leo committed Nov 2, 2021
1 parent a8a01db commit 192d711
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions uploader/uploader.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ func (upl *Uploader) uploadAnyLog_Async(indexName string) {
successList := bulkresponse.Succeeded()
upl.AnyLogs_lock.Lock()
for i := 0; i < len(successList); i++ {
upl.llog.Debugln("uploadAnyLog_Async delete succeeded record :", successList[i])
delete(upl.AnyLogs[indexName], successList[i].Id)
}
upl.AnyLogs_lock.Unlock()
Expand All @@ -220,8 +221,8 @@ func (upl *Uploader) uploadAnyLog_Async(indexName string) {
}

//wait and add
if len(upl.AnyLogs[indexName]) < 10 {
time.Sleep(120 * time.Second)
if len(upl.AnyLogs[indexName]) == 0 {
time.Sleep(5 * time.Second)
}
}

Expand Down

0 comments on commit 192d711

Please sign in to comment.