소스 검색

HUE-7439 [editor] Move optimizer call to after check status

Snappier fetch results this way.
Romain Rigaux 8 년 전
부모
커밋
e2a97d6
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      desktop/libs/notebook/src/notebook/static/notebook/js/notebook.ko.js

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

@@ -1306,9 +1306,6 @@ var EditorViewModel = (function() {
         if (data.status == 0) {
           self.result.handle(data.handle);
           self.result.hasResultset(data.handle.has_result_set);
-          if (vm.isOptimizerEnabled()) {
-            huePubSub.publish('editor.upload.query', data.history_id);
-          }
           if (data.handle.sync) {
             self.loadData(data.result, 100);
             self.status('available');
@@ -1318,6 +1315,9 @@ var EditorViewModel = (function() {
               self.checkStatus();
             }
           }
+          if (vm.isOptimizerEnabled()) {
+            huePubSub.publish('editor.upload.query', data.history_id);
+          }
         } else {
           self._ajaxError(data, self.execute);
         }