Browse Source

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

jdesjean 8 years ago
parent
commit
4abb362db9

+ 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',

File diff suppressed because it is too large
+ 5 - 5
apps/jobbrowser/src/jobbrowser/tests.py


Some files were not shown because too many files changed in this diff