mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 11:56:00 +00:00
feat: kill db process
This commit is contained in:
@@ -274,6 +274,20 @@ module.exports = {
|
||||
return this.loadDataCore('serverSummary', { conid });
|
||||
},
|
||||
|
||||
killDatabaseProcess_meta: true,
|
||||
async killDatabaseProcess(ctx, req) {
|
||||
const { conid, pid } = ctx;
|
||||
testConnectionPermission(conid, req);
|
||||
|
||||
const opened = await this.ensureOpened(conid);
|
||||
if (!opened) {
|
||||
return null;
|
||||
}
|
||||
if (opened.connection.isReadOnly) return false;
|
||||
|
||||
return this.sendRequest(opened, { msgtype: 'killDatabaseProcess', pid });
|
||||
},
|
||||
|
||||
summaryCommand_meta: true,
|
||||
async summaryCommand({ conid, command, row }, req) {
|
||||
testConnectionPermission(conid, req);
|
||||
|
||||
Reference in New Issue
Block a user