瀏覽代碼

HUE-7728 [jb] 500% progress in live Impala query browser sometimes

jdesjean 8 年之前
父節點
當前提交
4abb362db9
共有 2 個文件被更改,包括 7 次插入7 次删除
  1. 2 2
      apps/jobbrowser/src/jobbrowser/apis/query_api.py
  2. 5 5
      apps/jobbrowser/src/jobbrowser/tests.py

+ 2 - 2
apps/jobbrowser/src/jobbrowser/apis/query_api.py

@@ -114,7 +114,7 @@ class QueryApi(Api):
         'message': _('Unknown or expired query id %s') % appid
       }
     app = apps.get('apps')[0]
-    progress_groups = re.search(r"(\d{0,3})%", app.get('progress'))
+    progress_groups = re.search(r"([\d\.\,]+)%", app.get('progress'))
 
     common = {
         'id': app.get('id'),
@@ -122,7 +122,7 @@ class QueryApi(Api):
         'status': app.get('status'),
         'apiStatus': app.get('apiStatus'),
         'user': app.get('user'),
-        'progress': int(progress_groups.group(1)) if progress_groups and progress_groups.group(1) else 100,
+        'progress': float(progress_groups.group(1)) if progress_groups and progress_groups.group(1) else 100,
         'duration': app.get('duration'),
         'submitted': app.get('submitted'),
         'type': 'queries',

文件差異過大導致無法顯示
+ 5 - 5
apps/jobbrowser/src/jobbrowser/tests.py


部分文件因文件數量過多而無法顯示