16d49abed7fad03d8f8179d5e9f60d6ac79c1e5f
[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 _0x2e09=['list','describe','delete','dump','saved','pm2','bluebird','./config','connected','start','then','disconnect','restart'];(function(_0x58c66b,_0x4adc8e){var _0x47ca0e=function(_0x1c6b37){while(--_0x1c6b37){_0x58c66b['push'](_0x58c66b['shift']());}};_0x47ca0e(++_0x4adc8e);}(_0x2e09,0xc8));var _0x92e0=function(_0x22bd3d,_0x23db16){_0x22bd3d=_0x22bd3d-0x0;var _0x847e89=_0x2e09[_0x22bd3d];return _0x847e89;};'use strict';var pm2=require(_0x92e0('0x0'));var BPromise=require(_0x92e0('0x1'));var config=require(_0x92e0('0x2'));function connect(){return new BPromise(function(_0x25c7dd,_0x66647a){return pm2['connect'](function(_0x4c000f){if(_0x4c000f){return _0x66647a(_0x4c000f);}return _0x25c7dd(_0x92e0('0x3'));});});};exports[_0x92e0('0x4')]=function(_0x1c3791){return connect()[_0x92e0('0x5')](function(){return new BPromise(function(_0x3fe618,_0x47c199){return pm2['start'](_0x1c3791,function(_0x437bb4,_0x2308d3){if(_0x437bb4){return _0x47c199(_0x437bb4);}pm2[_0x92e0('0x6')]();return _0x3fe618(_0x2308d3);});});});};exports['stop']=function(_0x5dd32f){return connect()[_0x92e0('0x5')](function(){return new BPromise(function(_0x43cbb1,_0x43c55e){return pm2['stop'](_0x5dd32f,function(_0x979e4,_0x351ddb){if(_0x979e4){return _0x43c55e(_0x979e4);}pm2[_0x92e0('0x6')]();return _0x43cbb1(_0x351ddb);});});});};exports[_0x92e0('0x7')]=function(_0x36b0a1){return connect()[_0x92e0('0x5')](function(){return new BPromise(function(_0x4ff654,_0x1adced){return pm2[_0x92e0('0x7')](_0x36b0a1,function(_0x5100f0,_0x5d634f){if(_0x5100f0){return _0x1adced(_0x5100f0);}pm2[_0x92e0('0x6')]();return _0x4ff654(_0x5d634f);});});});};exports[_0x92e0('0x8')]=function(){return connect()['then'](function(){return new BPromise(function(_0x19351a,_0x273031){return pm2[_0x92e0('0x8')](function(_0x5f4615,_0x36084d){if(_0x5f4615){return _0x273031(_0x5f4615);}pm2[_0x92e0('0x6')]();return _0x19351a(_0x36084d);});});});};exports[_0x92e0('0x9')]=function(_0x50c648){return connect()[_0x92e0('0x5')](function(){return new BPromise(function(_0x3d6d87,_0x5a7c6e){return pm2[_0x92e0('0x9')](_0x50c648,function(_0x15a4d3,_0x1552ad){if(_0x15a4d3){return _0x5a7c6e(_0x15a4d3);}pm2[_0x92e0('0x6')]();return _0x3d6d87(_0x1552ad);});});});};exports[_0x92e0('0xa')]=function(_0x3a2d03){return connect()['then'](function(){return new BPromise(function(_0x247f7c,_0x38c0ff){return pm2[_0x92e0('0xa')](_0x3a2d03,function(_0x224fd5,_0x3a8558){if(_0x224fd5){return _0x38c0ff(_0x224fd5);}pm2['disconnect']();return _0x247f7c(_0x3a8558);});});});};exports['dump']=function(){return connect()[_0x92e0('0x5')](function(){return new BPromise(function(_0x3b8aa4,_0x4aa803){return pm2[_0x92e0('0xb')](function(_0x11f3fa){if(_0x11f3fa){return _0x4aa803(_0x11f3fa);}return _0x3b8aa4(_0x92e0('0xc'));});});});};