|
|
@ -534,8 +534,18 @@ def checkFpmStatusFile(version): |
|
|
|
|
|
|
|
|
|
|
|
def getFpmStatus(version): |
|
|
|
def getFpmStatus(version): |
|
|
|
checkFpmStatusFile(version) |
|
|
|
checkFpmStatusFile(version) |
|
|
|
result = mw.httpGet( |
|
|
|
|
|
|
|
'http://127.0.0.1/phpfpm_status_' + version + '?json') |
|
|
|
try: |
|
|
|
|
|
|
|
url = 'http://' + mw.getLocalIp() + '/phpfpm_status_' + version + '?json' |
|
|
|
|
|
|
|
result = mw.httpGet(url) |
|
|
|
|
|
|
|
except Exception as e: |
|
|
|
|
|
|
|
url = 'http://127.0.0.1/phpfpm_status_' + version + '?json' |
|
|
|
|
|
|
|
result = mw.httpGet(url) |
|
|
|
|
|
|
|
else: |
|
|
|
|
|
|
|
tmp = {} |
|
|
|
|
|
|
|
tmp['start time'] = time.strftime('%Y-%m-%d %H:%M:%S', fTime) |
|
|
|
|
|
|
|
return mw.getJson(tmp) |
|
|
|
|
|
|
|
|
|
|
|
tmp = json.loads(result) |
|
|
|
tmp = json.loads(result) |
|
|
|
fTime = time.localtime(int(tmp['start time'])) |
|
|
|
fTime = time.localtime(int(tmp['start time'])) |
|
|
|
tmp['start time'] = time.strftime('%Y-%m-%d %H:%M:%S', fTime) |
|
|
|
tmp['start time'] = time.strftime('%Y-%m-%d %H:%M:%S', fTime) |
|
|
|