mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-03 08:25:04 +00:00
fix: 无效的 es 报 500
This commit is contained in:
@@ -43,6 +43,9 @@ class CommandStore():
|
|||||||
self.is_new_index_type()
|
self.is_new_index_type()
|
||||||
|
|
||||||
def is_new_index_type(self):
|
def is_new_index_type(self):
|
||||||
|
if not self.ping(timeout=3):
|
||||||
|
return
|
||||||
|
|
||||||
# 检测索引是不是新的类型
|
# 检测索引是不是新的类型
|
||||||
data = self.es.indices.get_mapping(self.index)
|
data = self.es.indices.get_mapping(self.index)
|
||||||
try:
|
try:
|
||||||
|
Reference in New Issue
Block a user