瀏覽代碼

notify delay

apkipa 1 周之前
父節點
當前提交
b0599ba604
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      main.go

+ 3 - 1
main.go

@@ -377,7 +377,7 @@ func main_worker(app AppCtx, objUploadChan *util.DChan[string]) {
 					delete(objFailCounter, key)
 					mutexObjFailCounter.Unlock()
 					// Queue the object for upload
-					objUploadChan.Write(key)
+					objUploadChan.DelayedWrite(key, 1*time.Second)
 				}
 				if notifyInfo.Err != nil {
 					logger.Errorf("Bucket notification listener error: %v", notifyInfo.Err)
@@ -554,6 +554,8 @@ func trigger_full_upload(app AppCtx, objToUploadChan chan<- string) {
 			}
 		}
 	}
+
+	logger.Infoln("Full upload trigger finished")
 }
 
 func upload_one_stream(app AppCtx, streamName string) (fullyUploaded bool, err error) {