fdbda6beabfcd0a5ebf5dbafe80daa81ed117ba0
[motion2.git] / server / config / pm2 / index.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and   *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0xc2af=['pm2','bluebird','./config','connect','start','then','stop','disconnect','restart','list','describe','delete','dump','saved'];(function(_0x2a5a5f,_0x56a0e1){var _0x3bdbc9=function(_0x26a9a6){while(--_0x26a9a6){_0x2a5a5f['push'](_0x2a5a5f['shift']());}};_0x3bdbc9(++_0x56a0e1);}(_0xc2af,0x1b2));var _0xfc2a=function(_0x28387c,_0x3e8de4){_0x28387c=_0x28387c-0x0;var _0x21f67b=_0xc2af[_0x28387c];return _0x21f67b;};'use strict';var pm2=require(_0xfc2a('0x0'));var BPromise=require(_0xfc2a('0x1'));var config=require(_0xfc2a('0x2'));function connect(){return new BPromise(function(_0x558125,_0x219723){return pm2[_0xfc2a('0x3')](function(_0x5f122e){if(_0x5f122e){return _0x219723(_0x5f122e);}return _0x558125('connected');});});};exports[_0xfc2a('0x4')]=function(_0x1b6d58){return connect()[_0xfc2a('0x5')](function(){return new BPromise(function(_0x1f068d,_0x49dc23){return pm2[_0xfc2a('0x4')](_0x1b6d58,function(_0x2a8ca6,_0x591698){if(_0x2a8ca6){return _0x49dc23(_0x2a8ca6);}pm2['disconnect']();return _0x1f068d(_0x591698);});});});};exports[_0xfc2a('0x6')]=function(_0x4548e5){return connect()['then'](function(){return new BPromise(function(_0x5ea70c,_0x369a20){return pm2[_0xfc2a('0x6')](_0x4548e5,function(_0x1e833e,_0x5eb3fe){if(_0x1e833e){return _0x369a20(_0x1e833e);}pm2[_0xfc2a('0x7')]();return _0x5ea70c(_0x5eb3fe);});});});};exports[_0xfc2a('0x8')]=function(_0x5c80cd){return connect()[_0xfc2a('0x5')](function(){return new BPromise(function(_0x1d7058,_0x565eb9){return pm2[_0xfc2a('0x8')](_0x5c80cd,function(_0x4fcc43,_0x52e6c0){if(_0x4fcc43){return _0x565eb9(_0x4fcc43);}pm2[_0xfc2a('0x7')]();return _0x1d7058(_0x52e6c0);});});});};exports[_0xfc2a('0x9')]=function(){return connect()[_0xfc2a('0x5')](function(){return new BPromise(function(_0x3c3cb5,_0x3f9190){return pm2[_0xfc2a('0x9')](function(_0x3f6237,_0x125049){if(_0x3f6237){return _0x3f9190(_0x3f6237);}pm2[_0xfc2a('0x7')]();return _0x3c3cb5(_0x125049);});});});};exports['describe']=function(_0xd72548){return connect()[_0xfc2a('0x5')](function(){return new BPromise(function(_0x40a922,_0x24eaec){return pm2[_0xfc2a('0xa')](_0xd72548,function(_0x4bd86a,_0x495d0e){if(_0x4bd86a){return _0x24eaec(_0x4bd86a);}pm2[_0xfc2a('0x7')]();return _0x40a922(_0x495d0e);});});});};exports[_0xfc2a('0xb')]=function(_0x4ba64c){return connect()[_0xfc2a('0x5')](function(){return new BPromise(function(_0x30d8d8,_0x41ebff){return pm2[_0xfc2a('0xb')](_0x4ba64c,function(_0x30cc02,_0x17a104){if(_0x30cc02){return _0x41ebff(_0x30cc02);}pm2[_0xfc2a('0x7')]();return _0x30d8d8(_0x17a104);});});});};exports['dump']=function(){return connect()[_0xfc2a('0x5')](function(){return new BPromise(function(_0x39b5f4,_0x44f1d7){return pm2[_0xfc2a('0xc')](function(_0x2c43ed){if(_0x2c43ed){return _0x44f1d7(_0x2c43ed);}return _0x39b5f4(_0xfc2a('0xd'));});});});};