瀏覽代碼

HUE-7438 [editor] Query execution time is not updated on short queries

Time was updated only after one fetch status, not when the queries was ready right away.
Romain Rigaux 8 年之前
父節點
當前提交
67fc092
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      desktop/libs/notebook/src/notebook/static/notebook/js/notebook.ko.js

+ 1 - 1
desktop/libs/notebook/src/notebook/static/notebook/js/notebook.ko.js

@@ -1653,12 +1653,12 @@ var EditorViewModel = (function() {
           if (vm.editorMode()) {
             self.getLogs();
           }
+          self.result.endTime(new Date());
 
           if (data.status === 0) {
             self.status(data.query_status.status);
 
             if (self.status() == 'running' || self.status() == 'starting' || self.status() == 'waiting') {
-              self.result.endTime(new Date());
               var delay = self.result.executionTime() > 45000 ? 5000 : 1000; // 5s if more than 45s
               if (! notebook.unloaded()) {
                 self.checkStatusTimeout = setTimeout(self.checkStatus, delay);