This commit is contained in:
midoks 2022-06-23 03:20:45 +08:00
parent d782d79f46
commit bb470e2876
2 changed files with 2 additions and 4 deletions

View File

@ -265,9 +265,7 @@ def initdUinstall():
def runInfo():
# 取Openresty负载状态
try:
url = 'http://' + mw.getHostAddr() + '/nginx_status'
result = mw.httpGet(url)
@ -294,7 +292,7 @@ def runInfo():
data['Writing'] = tmp[13]
data['Waiting'] = tmp[15]
return mw.getJson(data)
else:
except Exception as e:
return 'oprenresty not started'

View File

@ -549,7 +549,7 @@ def getFpmStatus(version):
data = json.loads(result)
fTime = time.localtime(int(data['start time']))
data['start time'] = time.strftime('%Y-%m-%d %H:%M:%S', fTime)
else:
except Exception as e:
data = {}
return mw.getJson(data)