Commit 442304d6 authored by priit's avatar priit

Dockeri alge

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