Fix raise notice from func/proc or code blocks are no longer displayed live. #6420
parent
a9ae7ca099
commit
c5cbb33a06
|
@ -885,6 +885,9 @@ def poll(trans_id):
|
||||||
info='DATAGRID_TRANSACTION_REQUIRED',
|
info='DATAGRID_TRANSACTION_REQUIRED',
|
||||||
status=404)
|
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:
|
if status and conn is not None and session_obj is not None:
|
||||||
status, result = conn.poll(
|
status, result = conn.poll(
|
||||||
formatted_exception_msg=True, no_result=True)
|
formatted_exception_msg=True, no_result=True)
|
||||||
|
|
|
@ -88,6 +88,10 @@ export class ResultSetUtils {
|
||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static isCursorInitialised(httpMessage) {
|
||||||
|
return httpMessage.data.data.status === 'NotInitialised';
|
||||||
|
}
|
||||||
|
|
||||||
static isQueryFinished(httpMessage) {
|
static isQueryFinished(httpMessage) {
|
||||||
return httpMessage.data.data.status === 'Success';
|
return httpMessage.data.data.status === 'Success';
|
||||||
}
|
}
|
||||||
|
@ -302,7 +306,10 @@ export class ResultSetUtils {
|
||||||
if(httpMessage.data.data.notifies) {
|
if(httpMessage.data.data.notifies) {
|
||||||
this.eventBus.fireEvent(QUERY_TOOL_EVENTS.PUSH_NOTICE, 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());
|
this.setEndTime(new Date());
|
||||||
msg = this.queryFinished(httpMessage, onResultsAvailable, onExplain);
|
msg = this.queryFinished(httpMessage, onResultsAvailable, onExplain);
|
||||||
} else if (ResultSetUtils.isQueryStillRunning(httpMessage)) {
|
} else if (ResultSetUtils.isQueryStillRunning(httpMessage)) {
|
||||||
|
@ -828,8 +835,8 @@ export function ResultSet() {
|
||||||
};
|
};
|
||||||
|
|
||||||
const executeAndPoll = async ()=>{
|
const executeAndPoll = async ()=>{
|
||||||
let goForPoll = await yesCallback();
|
yesCallback();
|
||||||
if (goForPoll) pollCallback();
|
pollCallback();
|
||||||
};
|
};
|
||||||
|
|
||||||
if(isDataChanged()) {
|
if(isDataChanged()) {
|
||||||
|
|
|
@ -1352,6 +1352,11 @@ WHERE db.datname = current_database()""")
|
||||||
self.conn = None
|
self.conn = None
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
def async_cursor_initialised(self):
|
||||||
|
if self.__async_cursor:
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
def _decrypt_password(self, manager):
|
def _decrypt_password(self, manager):
|
||||||
"""
|
"""
|
||||||
Decrypt password
|
Decrypt password
|
||||||
|
|
Loading…
Reference in New Issue