9fd68a0ddd0ceefb6a0bc73c7f48c7f470a3554a
[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 _0x004c=['disconnect','stop','restart','list','describe','delete','saved','pm2','bluebird','./config','connect','connected','start','then'];(function(_0x305db9,_0x18812a){var _0x1c927d=function(_0x1f267c){while(--_0x1f267c){_0x305db9['push'](_0x305db9['shift']());}};_0x1c927d(++_0x18812a);}(_0x004c,0x85));var _0xc004=function(_0x3e44fa,_0x75ed2a){_0x3e44fa=_0x3e44fa-0x0;var _0x2a0aba=_0x004c[_0x3e44fa];return _0x2a0aba;};'use strict';var pm2=require(_0xc004('0x0'));var BPromise=require(_0xc004('0x1'));var config=require(_0xc004('0x2'));function connect(){return new BPromise(function(_0x2cf6a8,_0x4c7289){return pm2[_0xc004('0x3')](function(_0x4016c5){if(_0x4016c5){return _0x4c7289(_0x4016c5);}return _0x2cf6a8(_0xc004('0x4'));});});};exports[_0xc004('0x5')]=function(_0x571646){return connect()[_0xc004('0x6')](function(){return new BPromise(function(_0x5413ec,_0x2c7142){return pm2[_0xc004('0x5')](_0x571646,function(_0x5ef023,_0x4c12db){if(_0x5ef023){return _0x2c7142(_0x5ef023);}pm2[_0xc004('0x7')]();return _0x5413ec(_0x4c12db);});});});};exports[_0xc004('0x8')]=function(_0x40ad0c){return connect()[_0xc004('0x6')](function(){return new BPromise(function(_0x4dc7bc,_0x13f5c7){return pm2[_0xc004('0x8')](_0x40ad0c,function(_0xf67998,_0x9a540e){if(_0xf67998){return _0x13f5c7(_0xf67998);}pm2[_0xc004('0x7')]();return _0x4dc7bc(_0x9a540e);});});});};exports[_0xc004('0x9')]=function(_0x227616){return connect()[_0xc004('0x6')](function(){return new BPromise(function(_0x46850d,_0x1d39a7){return pm2['restart'](_0x227616,function(_0x1f7493,_0x2adc41){if(_0x1f7493){return _0x1d39a7(_0x1f7493);}pm2[_0xc004('0x7')]();return _0x46850d(_0x2adc41);});});});};exports[_0xc004('0xa')]=function(){return connect()[_0xc004('0x6')](function(){return new BPromise(function(_0x2c985a,_0x3ffc0f){return pm2[_0xc004('0xa')](function(_0x208fa5,_0x428679){if(_0x208fa5){return _0x3ffc0f(_0x208fa5);}pm2[_0xc004('0x7')]();return _0x2c985a(_0x428679);});});});};exports[_0xc004('0xb')]=function(_0x21d31b){return connect()[_0xc004('0x6')](function(){return new BPromise(function(_0x5acb38,_0x388f5a){return pm2[_0xc004('0xb')](_0x21d31b,function(_0x1112d9,_0x2795bb){if(_0x1112d9){return _0x388f5a(_0x1112d9);}pm2[_0xc004('0x7')]();return _0x5acb38(_0x2795bb);});});});};exports['delete']=function(_0x7368ae){return connect()[_0xc004('0x6')](function(){return new BPromise(function(_0x275951,_0xf89a45){return pm2[_0xc004('0xc')](_0x7368ae,function(_0x2aeea2,_0x36885e){if(_0x2aeea2){return _0xf89a45(_0x2aeea2);}pm2['disconnect']();return _0x275951(_0x36885e);});});});};exports['dump']=function(){return connect()[_0xc004('0x6')](function(){return new BPromise(function(_0x3cc9f4,_0x43fbbe){return pm2['dump'](function(_0x195c23){if(_0x195c23){return _0x43fbbe(_0x195c23);}return _0x3cc9f4(_0xc004('0xd'));});});});};