Эх сурвалжийг харах

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 жил өмнө
parent
commit
67fc092

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

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