libf 3 месяцев назад
Родитель
Сommit
d0e1031df0
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      importer/importer.go

+ 2 - 1
importer/importer.go

@@ -212,7 +212,7 @@ func (importer *Importer) ImportFiles(fwop func(basedir string, fpath string) FW
 				importer.importstatus.TotalUseTime = time.Since(importer.starttime)
 				importer.importstatus.mutex.Unlock()
 				importer.importstatus.Save()
-				if totalretrycount > 0 {
+				if retries > 0 {
 					logger.Info("file", filename, "total imported", lines, "lines", records, "records", retries, "retry times")
 				} else {
 					logger.Info("file", filename, "total imported", lines, "lines", records, "records")
@@ -277,6 +277,7 @@ func (importer *Importer) importReader(filename string, buf io.Reader, linefrom,
 	skiplines := int(linefrom)
 	blockcount = blockfrom
 	doinglines := []int64{}
+	retrycount = totalretrycount
 	var wg sync.WaitGroup
 	defer importer.done()
 	defer wg.Wait()