Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'input-index': null,
output: myoutput,
'output-index': index,
inputTransport: null,
outputTransport: null,
searchBody: null,
sourceOnly: false,
jsonLines: false,
format: '',
'ignore-errors': false,
scrollTime: '10m',
timeout: null,
skip: null,
toLog: null,
};
const dumper = new Elasticdump(options.input, options.output, options);
dumper.on('log', function (message) { Log.debug(message); });
dumper.on('error', function (error) { Log.debug('error', 'Error Emitted => ' + (error.message || JSON.stringify(error))); });
const promise = new Promise(function (resolve, reject) {
dumper.dump(function (error) {
if (error) {
Log.debug('THERE WAS AN ERROR :-(');
reject(Error(error));
} else {
resolve ('elasticdumpModule success');
}
});
});
return promise;
},