Update index.py

pull/121/head
midoks 3 years ago
parent 28cef71bf4
commit 0762682015
  1. 10
      plugins/php-apt/index.py

@ -481,14 +481,16 @@ def getFpmStatus(version):
try: try:
sock_data = mw.requestFcgiPHP( sock_data = mw.requestFcgiPHP(
sock_file, '/phpfpm_status_apt' + version + '?json') 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: except Exception as e:
return mw.returnJson(False, str(e)) return mw.returnJson(False, str(e))
# print(data) # 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) return mw.returnJson(True, "OK", data)

Loading…
Cancel
Save