f438b69355b4c0ff3dd63d186bd506a6ff28dde8
[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 _0x2e65=['./config','connect','connected','then','start','disconnect','stop','restart','list','describe','delete','dump','saved','pm2','bluebird'];(function(_0x178f3e,_0x567056){var _0x2c73ab=function(_0x240923){while(--_0x240923){_0x178f3e['push'](_0x178f3e['shift']());}};_0x2c73ab(++_0x567056);}(_0x2e65,0x193));var _0x52e6=function(_0x2be8c2,_0x14a4b5){_0x2be8c2=_0x2be8c2-0x0;var _0x97f531=_0x2e65[_0x2be8c2];return _0x97f531;};'use strict';var pm2=require(_0x52e6('0x0'));var BPromise=require(_0x52e6('0x1'));var config=require(_0x52e6('0x2'));function connect(){return new BPromise(function(_0x120587,_0xd7e693){return pm2[_0x52e6('0x3')](function(_0x1ab739){if(_0x1ab739){return _0xd7e693(_0x1ab739);}return _0x120587(_0x52e6('0x4'));});});};exports['start']=function(_0x383919){return connect()[_0x52e6('0x5')](function(){return new BPromise(function(_0x214197,_0xe67caa){return pm2[_0x52e6('0x6')](_0x383919,function(_0x116651,_0x15e4af){if(_0x116651){return _0xe67caa(_0x116651);}pm2[_0x52e6('0x7')]();return _0x214197(_0x15e4af);});});});};exports[_0x52e6('0x8')]=function(_0x2ab17e){return connect()['then'](function(){return new BPromise(function(_0x1e3906,_0x1db169){return pm2['stop'](_0x2ab17e,function(_0x330040,_0x543f78){if(_0x330040){return _0x1db169(_0x330040);}pm2['disconnect']();return _0x1e3906(_0x543f78);});});});};exports[_0x52e6('0x9')]=function(_0x3eedf0){return connect()[_0x52e6('0x5')](function(){return new BPromise(function(_0x465542,_0x30d7fb){return pm2[_0x52e6('0x9')](_0x3eedf0,function(_0x538471,_0x5c2e3b){if(_0x538471){return _0x30d7fb(_0x538471);}pm2[_0x52e6('0x7')]();return _0x465542(_0x5c2e3b);});});});};exports[_0x52e6('0xa')]=function(){return connect()['then'](function(){return new BPromise(function(_0x2692a8,_0x22f31){return pm2[_0x52e6('0xa')](function(_0x32035b,_0x3c80c1){if(_0x32035b){return _0x22f31(_0x32035b);}pm2[_0x52e6('0x7')]();return _0x2692a8(_0x3c80c1);});});});};exports[_0x52e6('0xb')]=function(_0x215a30){return connect()[_0x52e6('0x5')](function(){return new BPromise(function(_0x38fd03,_0x30ef30){return pm2[_0x52e6('0xb')](_0x215a30,function(_0x44fc06,_0x5c275c){if(_0x44fc06){return _0x30ef30(_0x44fc06);}pm2['disconnect']();return _0x38fd03(_0x5c275c);});});});};exports[_0x52e6('0xc')]=function(_0x53b7d7){return connect()['then'](function(){return new BPromise(function(_0x3a3a47,_0x3997ed){return pm2[_0x52e6('0xc')](_0x53b7d7,function(_0x538568,_0x2954ce){if(_0x538568){return _0x3997ed(_0x538568);}pm2['disconnect']();return _0x3a3a47(_0x2954ce);});});});};exports[_0x52e6('0xd')]=function(){return connect()[_0x52e6('0x5')](function(){return new BPromise(function(_0x3cf7f0,_0x59aaa2){return pm2[_0x52e6('0xd')](function(_0x54ee91){if(_0x54ee91){return _0x59aaa2(_0x54ee91);}return _0x3cf7f0(_0x52e6('0xe'));});});});};