mirror of
https://github.com/Fabio286/antares.git
synced 2025-06-05 21:59:22 +02:00
Merge branch 'develop' of https://github.com/antares-sql/antares into feat/new-scratchpad
This commit is contained in:
@@ -240,17 +240,8 @@ export default (connections: {[key: string]: antares.Client}) => {
|
||||
});
|
||||
|
||||
// Exporter message listener
|
||||
exporter.stdout.on('data', (buff: Buffer) => {
|
||||
let message;
|
||||
try { // Ignore non-JSON data (console.log output)
|
||||
message = JSON.parse(buff.toString());
|
||||
}
|
||||
catch (_) {
|
||||
if (process.env.NODE_ENV === 'development') console.log('EXPORTER:', buff.toString());
|
||||
return;
|
||||
}
|
||||
|
||||
const { type, payload } = message as workers.WorkerIpcMessage;
|
||||
exporter.on('message', (message: workers.WorkerIpcMessage) => {
|
||||
const { type, payload } = message;
|
||||
|
||||
switch (type) {
|
||||
case 'export-progress':
|
||||
@@ -331,17 +322,8 @@ export default (connections: {[key: string]: antares.Client}) => {
|
||||
});
|
||||
|
||||
// Importer message listener
|
||||
importer.stdout.on('data', (buff: Buffer) => {
|
||||
let message;
|
||||
try { // Ignore non-JSON data (console.log output)
|
||||
message = JSON.parse(buff.toString());
|
||||
}
|
||||
catch (_) {
|
||||
if (process.env.NODE_ENV === 'development') console.log('IMPORTER:', buff.toString());
|
||||
return;
|
||||
}
|
||||
|
||||
const { type, payload } = message as workers.WorkerIpcMessage;
|
||||
importer.on('message', (message: workers.WorkerIpcMessage) => {
|
||||
const { type, payload } = message;
|
||||
|
||||
switch (type) {
|
||||
case 'import-progress':
|
||||
|
Reference in New Issue
Block a user