Commit 442304d6 authored by priit's avatar priit
Browse files

Dockeri alge

parent 7b7e926b
...@@ -25,7 +25,7 @@ router.post('/', function ( req, res ) { ...@@ -25,7 +25,7 @@ router.post('/', function ( req, res ) {
wrapperService.execute( serviceRequest, function (err, data) { wrapperService.execute( serviceRequest, function (err, data) {
if(err){ if(err){
logger.debug('Got error'); logger.debug('Got error', err);
return res.send({errors: err}); return res.send({errors: err});
} }
res.send(data); res.send(data);
......
...@@ -9,7 +9,10 @@ function WrapperService() { ...@@ -9,7 +9,10 @@ function WrapperService() {
this.execute = function(serviceRequest, callback) { this.execute = function(serviceRequest, callback) {
sessionService.createSession(serviceRequest, function (err, session) { sessionService.createSession(serviceRequest, function (err, session) {
if(err) return callback(err); if(err){
logger.debug('Session creation error', err);
return callback(err);
}
if (session.isAsync == true) { if (session.isAsync == true) {
self.getServiceResponse(session.id, callback); self.getServiceResponse(session.id, callback);
...@@ -18,13 +21,18 @@ function WrapperService() { ...@@ -18,13 +21,18 @@ function WrapperService() {
var processor = new Processor(); var processor = new Processor();
processor.process( session, function ( err, session ) { processor.process( session, function ( err, session ) {
if(err) return callback(err); if(err){
logger.debug('Session creation error', err);
return callback(err);
}
sessionService.closeSession(session, function (err, session) { sessionService.closeSession(session, function (err, session) {
logger.debug('Sessioon on lõpetanud ja savestatud. isAsync:' + session.isAsync); logger.debug('Sessioon on lõpetanud ja savestatud. isAsync:' + session.isAsync);
if (session.isAsync == false) { if (session.isAsync == false) {
logger.debug('Send response'); logger.debug('Send response');
if(err) return callback(err); if(err){
return callback(err);
}
self.getServiceResponse(session.id, callback); self.getServiceResponse(session.id, callback);
} }
}); });
......
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