mirror of https://github.com/Fabio286/antares.git
chore: post merge cleanup
This commit is contained in:
parent
62614dceb9
commit
9ce53165e8
|
@ -237,7 +237,7 @@ export default (connections: {[key: string]: antares.Client}) => {
|
|||
},
|
||||
tables,
|
||||
options: rest
|
||||
}));
|
||||
});
|
||||
|
||||
// Exporter message listener
|
||||
exporter.stdout.on('data', (buff: Buffer) => {
|
||||
|
@ -328,7 +328,7 @@ export default (connections: {[key: string]: antares.Client}) => {
|
|||
type: 'init',
|
||||
dbConfig,
|
||||
options
|
||||
}));
|
||||
});
|
||||
|
||||
// Importer message listener
|
||||
importer.stdout.on('data', (buff: Buffer) => {
|
||||
|
|
|
@ -39,7 +39,7 @@ const exportHandler = async (data: any) => {
|
|||
parentPort.postMessage({
|
||||
type: 'error',
|
||||
payload: `"${client.name}" exporter not aviable`
|
||||
}));
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,7 @@ const exportHandler = async (data: any) => {
|
|||
parentPort.postMessage({
|
||||
type: 'error',
|
||||
payload: err.toString()
|
||||
}));
|
||||
});
|
||||
});
|
||||
|
||||
exporter.once('end', () => {
|
||||
|
@ -67,7 +67,7 @@ const exportHandler = async (data: any) => {
|
|||
parentPort.postMessage({
|
||||
type: 'export-progress',
|
||||
payload: state
|
||||
}));
|
||||
});
|
||||
});
|
||||
|
||||
exporter.run();
|
||||
|
@ -77,7 +77,7 @@ const exportHandler = async (data: any) => {
|
|||
parentPort.postMessage({
|
||||
type: 'error',
|
||||
payload: err.toString()
|
||||
}));
|
||||
});
|
||||
}
|
||||
}
|
||||
else if (type === 'cancel')
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
import SSHConfig from '@fabio286/ssh2-promise/lib/sshConfig';
|
||||
import * as antares from 'common/interfaces/antares';
|
||||
import { ImportOptions } from 'common/interfaces/importer';
|
||||
import * as log from 'electron-log/main';
|
||||
import * as mysql from 'mysql2';
|
||||
import * as pg from 'pg';
|
||||
|
@ -48,7 +50,7 @@ const importHandler = async (data: {
|
|||
parentPort.postMessage({
|
||||
type: 'error',
|
||||
payload: `"${options.type}" importer not aviable`
|
||||
}));
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -57,14 +59,14 @@ const importHandler = async (data: {
|
|||
parentPort.postMessage({
|
||||
type: 'error',
|
||||
payload: err.toString()
|
||||
}));
|
||||
});
|
||||
});
|
||||
|
||||
importer.once('end', () => {
|
||||
parentPort.postMessage({
|
||||
type: 'end',
|
||||
payload: { cancelled: importer.isCancelled }
|
||||
}));
|
||||
});
|
||||
});
|
||||
|
||||
importer.once('cancel', () => {
|
||||
|
@ -75,14 +77,14 @@ const importHandler = async (data: {
|
|||
parentPort.postMessage({
|
||||
type: 'import-progress',
|
||||
payload: state
|
||||
}));
|
||||
});
|
||||
});
|
||||
|
||||
importer.on('query-error', state => {
|
||||
parentPort.postMessage({
|
||||
type: 'query-error',
|
||||
payload: state
|
||||
}));
|
||||
});
|
||||
});
|
||||
|
||||
importer.run();
|
||||
|
@ -92,7 +94,7 @@ const importHandler = async (data: {
|
|||
parentPort.postMessage({
|
||||
type: 'error',
|
||||
payload: err.toString()
|
||||
}));
|
||||
});
|
||||
}
|
||||
}
|
||||
else if (type === 'cancel')
|
||||
|
|
Loading…
Reference in New Issue