From bb470e2876bb0e99d928af7e8d1b0b2c1331752d Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 03:20:45 +0800 Subject: [PATCH] up --- plugins/openresty/index.py | 4 +--- plugins/php/index.py | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/plugins/openresty/index.py b/plugins/openresty/index.py index 18a398605..121190493 100755 --- a/plugins/openresty/index.py +++ b/plugins/openresty/index.py @@ -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' diff --git a/plugins/php/index.py b/plugins/php/index.py index c4b189bf9..fe6be8eca 100755 --- a/plugins/php/index.py +++ b/plugins/php/index.py @@ -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)