Fix raise notice from func/proc or code blocks are no longer displayed live. #6420

This commit is contained in:
Khushboo Vashi authored and GitHub committed 2023-06-19 17:04:22 +05:30
1 parent a9ae7ca099
commit c5cbb33a06
3 files changed
+18 -3

No files matched your search

+3
View File
@@ -885,6 +885,9 @@ def poll(trans_id):
info='DATAGRID_TRANSACTION_REQUIRED',
status=404)
if not conn.async_cursor_initialised():
return make_json_response(data={'status': 'NotInitialised'})
if status and conn is not None and session_obj is not None:
status, result = conn.poll(
formatted_exception_msg=True, no_result=True)
@@ -88,6 +88,10 @@ export class ResultSetUtils {
return msg;
}
static isCursorInitialised(httpMessage) {
return httpMessage.data.data.status === 'NotInitialised';
}
static isQueryFinished(httpMessage) {
return httpMessage.data.data.status === 'Success';
}
@@ -302,7 +306,10 @@ export class ResultSetUtils {
if(httpMessage.data.data.notifies) {
this.eventBus.fireEvent(QUERY_TOOL_EVENTS.PUSH_NOTICE, httpMessage.data.data.notifies);
}
if (ResultSetUtils.isQueryFinished(httpMessage)) {
if (ResultSetUtils.isCursorInitialised(httpMessage)) {
return Promise.resolve(this.pollForResult(onResultsAvailable, onExplain, onPollError));
} else if (ResultSetUtils.isQueryFinished(httpMessage)) {
this.setEndTime(new Date());
msg = this.queryFinished(httpMessage, onResultsAvailable, onExplain);
} else if (ResultSetUtils.isQueryStillRunning(httpMessage)) {
@@ -828,8 +835,8 @@ export function ResultSet() {
};
const executeAndPoll = async ()=>{
let goForPoll = await yesCallback();
if (goForPoll) pollCallback();
yesCallback();
pollCallback();
};
if(isDataChanged()) {