2018-01-26 12:33:40 +08:00
|
|
|
/*
|
|
|
|
* WIP: the mcs-core lib will be turned into a dependecy sometime in the near
|
|
|
|
* future, and it will probably act with a separate process that answers via
|
|
|
|
* its own redis channel
|
|
|
|
*/
|
|
|
|
const Logger = require('../../utils/Logger');
|
2017-11-11 05:05:51 +08:00
|
|
|
const MCSApiStub = require('./media/MCSApiStub');
|
|
|
|
|
|
|
|
process.on('uncaughtException', function (error) {
|
2018-01-26 12:33:40 +08:00
|
|
|
Logger.error("[mcs-core-process] Uncaught exception with error", error.stack);
|
2017-11-11 05:05:51 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
process.on('disconnect',function() {
|
2018-01-26 12:33:40 +08:00
|
|
|
Logger.info("[mcs-core-process] Parent process exited!");
|
2017-11-11 05:05:51 +08:00
|
|
|
process.kill();
|
|
|
|
});
|
|
|
|
|
|
|
|
core = new MCSApiStub();
|