This commit is contained in:
parent
d782d79f46
commit
bb470e2876
|
|
@ -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'
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue