Browse Source

Merge branch 'master' of http://gogsb.soaringnova.com/sxwl_DL/datax-admin

Zhang Li 2 years ago
parent
commit
62fcf69fd1
1 changed files with 11 additions and 1 deletions
  1. 11 1
      app/utils/send_util.py

+ 11 - 1
app/utils/send_util.py

@@ -168,4 +168,14 @@ def update_jupyter(data):
         return res.json()
     else:
         msg = result['msg'] if 'msg' in result.keys() else result
-        raise Exception(f'更新jupyter,请求jupyter端失败-->{msg}')
+        raise Exception(f'更新jupyter,请求jupyter端失败-->{msg}')
+
+# 获取jupyter服务状态
+def get_jupyter_status(data):
+    res = requests.post(url=f'http://{PROGRAMME_URL}/helm/ops/status', json=data)
+    result = res.json()
+    if 'code' in result.keys() and result['code'] == 200:
+        return res.json()
+    else:
+        msg = result['msg'] if 'msg' in result.keys() else result
+        raise Exception(f'获取jupyter服务状态,请求jupyter端失败-->{msg}')