php502功能优化

pull/118/head
midoks 3 years ago
parent d06648ff47
commit 2663fd7a99
  1. 12
      task.py

@ -432,7 +432,15 @@ def startPHPVersion(version):
def checkPHPVersion(version):
try:
url = 'http://127.0.0.1/phpfpm_status_' + version
result = mw.httpGet(url)
result = mw.httpGet(url, 1)
if result.find('timed out'):
raise
except Exception as e:
url = 'http://' + mw.getLocalIp() + '/phpfpm_status_' + version
result = mw.httpGet(url, 1)
else:
result = 'Bad Gateway'
# print(version,result)
# 检查openresty
if result.find('Bad Gateway') != -1:
@ -458,8 +466,6 @@ def checkPHPVersion(version):
if os.path.exists(initd):
os.system(initd + ' reload')
return True
except:
return True
# --------------------------------------PHP监控 end--------------------------------------------- #

Loading…
Cancel
Save