mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-20 08:56:00 +00:00
SYNC: health status
This commit is contained in:
committed by
Diflow
parent
d5f8e01dd8
commit
3bb4652a49
@@ -43,6 +43,7 @@ function authMiddleware(req, res, next) {
|
||||
'/connections/dblogin-app',
|
||||
'/connections/dblogin-auth',
|
||||
'/connections/dblogin-auth-token',
|
||||
'/health',
|
||||
];
|
||||
|
||||
// console.log('********************* getAuthProvider()', getAuthProvider());
|
||||
|
||||
@@ -171,6 +171,7 @@ module.exports = {
|
||||
this.rejectRequest(runid, { message: 'No data returned, maybe input data source is too big' });
|
||||
logger.info({ code, pid: subprocess.pid }, 'Exited process');
|
||||
socket.emit(`runner-done-${runid}`, code);
|
||||
this.opened = this.opened.filter(x => x.runid != runid);
|
||||
});
|
||||
subprocess.on('error', error => {
|
||||
// console.log('... ERROR subprocess', error);
|
||||
@@ -180,6 +181,7 @@ module.exports = {
|
||||
severity: 'error',
|
||||
message: error.toString(),
|
||||
});
|
||||
this.opened = this.opened.filter(x => x.runid != runid);
|
||||
});
|
||||
const newOpened = {
|
||||
runid,
|
||||
@@ -224,6 +226,7 @@ module.exports = {
|
||||
if (onFinished) {
|
||||
onFinished();
|
||||
}
|
||||
this.opened = this.opened.filter(x => x.runid != runid);
|
||||
});
|
||||
subprocess.on('spawn', () => {
|
||||
this.dispatchMessage(runid, `Started external process ${command}`);
|
||||
@@ -241,6 +244,7 @@ module.exports = {
|
||||
});
|
||||
}
|
||||
socket.emit(`runner-done-${runid}`);
|
||||
this.opened = this.opened.filter(x => x.runid != runid);
|
||||
});
|
||||
|
||||
if (stdinFilePath) {
|
||||
|
||||
@@ -127,6 +127,9 @@ module.exports = {
|
||||
this.dispatchMessage(sesid, 'Query session closed');
|
||||
socket.emit(`session-closed-${sesid}`);
|
||||
});
|
||||
subprocess.on('error', () => {
|
||||
this.opened = this.opened.filter(x => x.sesid != sesid);
|
||||
});
|
||||
|
||||
subprocess.send({
|
||||
msgtype: 'connect',
|
||||
|
||||
Reference in New Issue
Block a user