mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-09 23:15:58 -06:00
Fix raise notice from func/proc or code blocks are no longer displayed live. #6420
This commit is contained in:
parent
a9ae7ca099
commit
c5cbb33a06
@ -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()) {
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user