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

This commit is contained in:
Khushboo Vashi 2023-06-19 17:04:22 +05:30 committed by GitHub
parent a9ae7ca099
commit c5cbb33a06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 3 deletions

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)

View File

@ -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()) {

View File

@ -1352,6 +1352,11 @@ WHERE db.datname = current_database()""")
self.conn = None
return False
def async_cursor_initialised(self):
if self.__async_cursor:
return True
return False
def _decrypt_password(self, manager):
"""
Decrypt password