mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-18 23:45:52 +08:00
Update index.py
This commit is contained in:
@@ -481,14 +481,16 @@ def getFpmStatus(version):
|
||||
try:
|
||||
sock_data = mw.requestFcgiPHP(
|
||||
sock_file, '/phpfpm_status_apt' + version + '?json')
|
||||
|
||||
result = str(sock_data, encoding='utf-8')
|
||||
data = json.loads(result)
|
||||
fTime = time.localtime(int(data['start time']))
|
||||
data['start time'] = time.strftime('%Y-%m-%d %H:%M:%S', fTime)
|
||||
except Exception as e:
|
||||
return mw.returnJson(False, str(e))
|
||||
|
||||
# print(data)
|
||||
result = str(sock_data, encoding='utf-8')
|
||||
data = json.loads(result)
|
||||
fTime = time.localtime(int(data['start time']))
|
||||
data['start time'] = time.strftime('%Y-%m-%d %H:%M:%S', fTime)
|
||||
|
||||
return mw.returnJson(True, "OK", data)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user