Quellcode durchsuchen

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 vor 8 Jahren
Ursprung
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()) {
             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);