Commit 7490ec5a authored by priit's avatar priit
Browse files

Väljundile laiendi määramise võimalus

parent b8595379
...@@ -48,13 +48,13 @@ function LocalExecutor() { ...@@ -48,13 +48,13 @@ function LocalExecutor() {
process.stderr.on('data', function (data) { process.stderr.on('data', function (data) {
logger.error('Got error: ' + data); logger.error('Got error: ' + data);
response.isSuccess = false; response.isSuccess = false;
response.errors.push({util:data}); response.errors.push({util:data.toString()});
}); });
process.on('error', function (data) { process.on('error', function (data) {
logger.error('Got error: ' + data); logger.error('Got error: ' + data);
response.isSuccess = false; response.isSuccess = false;
response.errors.push({util:data}); response.errors.push({util:data.toString()});
}); });
process.on('close', function (code, signal) { process.on('close', function (code, signal) {
......
...@@ -69,13 +69,15 @@ function Tokenizer(){ ...@@ -69,13 +69,15 @@ function Tokenizer(){
var mapping = JSON.stringify(tokens); var mapping = JSON.stringify(tokens);
logger.debug('Failide mappimine on lõpetatud'); logger.debug('Failide mappimine on lõpetatud');
session.addOutputFile('output', {
type: 'output',
fileName: path.basename(model.outputPaths.outputPath1),
filePath: model.outputPaths.outputPath1,
contentType: mime.lookup(model.outputPaths.outputPath1)
});
SessionService.storeToFile(session.id, mapping, { extension:'txt' }, function (error, mappingPath) { SessionService.storeToFile(session.id, mapping, { extension:'txt' }, function (error, mappingPath) {
session.addOutputFile('output', {
type: 'output',
fileName: path.basename(model.outputPaths.outputPath1),
filePath: model.outputPaths.outputPath1,
contentType: mime.lookup(model.outputPaths.outputPath1)
});
session.addOutputFile('mapping', { session.addOutputFile('mapping', {
type: 'mapping', type: 'mapping',
fileName: path.basename(mappingPath), fileName: path.basename(mappingPath),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment