Procházet zdrojové kódy

修复 qyxy_es addr2 为空时的bug

wcc před 1 rokem
rodič
revize
c97f775543
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 2 2
      qyxy_es_new/task.go

+ 2 - 2
qyxy_es_new/task.go

@@ -457,7 +457,7 @@ func SaveEs() {
 					}()
 					Es.BulkSave(Index, arru)
 					// 存在第二个集群
-					if Es2.S_esurl != "" {
+					if Es2 != nil && Es2.S_esurl != "" {
 						Es2.BulkSave(Index, arru)
 					}
 				}(arru)
@@ -473,7 +473,7 @@ func SaveEs() {
 					}()
 					Es.BulkSave(Index, arru)
 					// 存在第二个集群
-					if Es2.S_esurl != "" {
+					if Es2 != nil && Es2.S_esurl != "" {
 						Es2.BulkSave(Index, arru)
 					}
 				}(arru[:indexu])