mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 21:16:00 +00:00
show import/export error
This commit is contained in:
@@ -100,15 +100,15 @@ module.exports = {
|
||||
},
|
||||
|
||||
handle_copyStreamError(runid, { copyStreamError }) {
|
||||
const { reject, exitOnStreamError } = this.requests[runid];
|
||||
const { reject, exitOnStreamError } = this.requests[runid] || {};
|
||||
if (exitOnStreamError) {
|
||||
reject(copyStreamError);
|
||||
delete this.requests[runid];
|
||||
}
|
||||
},
|
||||
|
||||
handle_progress(runid, { progressName, status }) {
|
||||
socket.emit(`runner-progress-${runid}`, { progressName, status });
|
||||
handle_progress(runid, { progressName, status, errorMessage }) {
|
||||
socket.emit(`runner-progress-${runid}`, { progressName, status, errorMessage });
|
||||
},
|
||||
|
||||
rejectRequest(runid, error) {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
const EnsureStreamHeaderStream = require('../utility/EnsureStreamHeaderStream');
|
||||
const ColumnMapTransformStream = require('../utility/ColumnMapTransformStream');
|
||||
const streamPipeline = require('../utility/streamPipeline');
|
||||
const { getLogger, extractErrorLogData } = require('dbgate-tools');
|
||||
const logger = getLogger('copyStream');
|
||||
|
||||
/**
|
||||
* Copies reader to writer. Used for import, export tables and transfer data between tables
|
||||
@@ -52,10 +54,12 @@ async function copyStream(input, output, options) {
|
||||
msgtype: 'progress',
|
||||
progressName,
|
||||
status: 'error',
|
||||
errorMessage: err.message,
|
||||
});
|
||||
}
|
||||
|
||||
throw err;
|
||||
logger.error(extractErrorLogData(err, { progressName }), 'Import/export job failed');
|
||||
// throw err;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user