Commit de4b353b authored by priit's avatar priit

Utiliidi töö katkestamine

parent cd75e854
......@@ -17,12 +17,22 @@ function SessionService() {
this.getSession = function (sessionId, callback) {
daoService.get(sessionId, function (err, session) {
if(err) return callback(err);
if(session == null){
daoService.get(sessionId, function (err, sessionData) {
if(err) {
return callback(err);
}
if(sessionData == null){
logger.debug('Session not found: ' + sessionId);
return callback('Sessiooni ei leitud');
}
var session = new Session(sessionData.id);
logger.error('Session data: ', sessionData);
for(i in sessionData){
session[i] = sessionData[i];
}
callback(null, session);
});
};
......
......@@ -157,6 +157,11 @@ function ArchiveExtractor() {
});
});
};
this.kill = function (session, callback) {
logger.debug('Kill system process');
callback(null, 'Katkestamise signaal saadetud');
};
}
module.exports = ArchiveExtractor;
\ No newline at end of file
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