From 192d7112ea24beee60db30b3574f2e57c299c41d Mon Sep 17 00:00:00 2001 From: leo Date: Tue, 2 Nov 2021 18:16:56 +0800 Subject: [PATCH] update --- uploader/uploader.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/uploader/uploader.go b/uploader/uploader.go index 560f5a4..cc92e93 100644 --- a/uploader/uploader.go +++ b/uploader/uploader.go @@ -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() @@ -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) } }