Built motion from commit e02f907f.|2.6.14
[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 _0x1fe3=['pm2','bluebird','./config','connect','connected','start','disconnect','stop','then','restart','list','describe','delete','dump','saved'];(function(_0x3fbb91,_0x5ec106){var _0x3eb213=function(_0x118b9f){while(--_0x118b9f){_0x3fbb91['push'](_0x3fbb91['shift']());}};_0x3eb213(++_0x5ec106);}(_0x1fe3,0x159));var _0x31fe=function(_0x34f29c,_0x19ff72){_0x34f29c=_0x34f29c-0x0;var _0x5a2904=_0x1fe3[_0x34f29c];return _0x5a2904;};'use strict';var pm2=require(_0x31fe('0x0'));var BPromise=require(_0x31fe('0x1'));var config=require(_0x31fe('0x2'));function connect(){return new BPromise(function(_0x133a7f,_0x38809c){return pm2[_0x31fe('0x3')](function(_0xaf7b62){if(_0xaf7b62){return _0x38809c(_0xaf7b62);}return _0x133a7f(_0x31fe('0x4'));});});};exports[_0x31fe('0x5')]=function(_0x1b317f){return connect()['then'](function(){return new BPromise(function(_0x162c41,_0x270b2f){return pm2['start'](_0x1b317f,function(_0x5a3d65,_0x191bca){if(_0x5a3d65){return _0x270b2f(_0x5a3d65);}pm2[_0x31fe('0x6')]();return _0x162c41(_0x191bca);});});});};exports[_0x31fe('0x7')]=function(_0x25e863){return connect()[_0x31fe('0x8')](function(){return new BPromise(function(_0xf5aaef,_0x2ef8a4){return pm2[_0x31fe('0x7')](_0x25e863,function(_0x48eb7d,_0xb8f1f4){if(_0x48eb7d){return _0x2ef8a4(_0x48eb7d);}pm2['disconnect']();return _0xf5aaef(_0xb8f1f4);});});});};exports[_0x31fe('0x9')]=function(_0x4e8bfc){return connect()[_0x31fe('0x8')](function(){return new BPromise(function(_0xf3f829,_0x4c4872){return pm2[_0x31fe('0x9')](_0x4e8bfc,function(_0x4838ce,_0x25c842){if(_0x4838ce){return _0x4c4872(_0x4838ce);}pm2['disconnect']();return _0xf3f829(_0x25c842);});});});};exports[_0x31fe('0xa')]=function(){return connect()['then'](function(){return new BPromise(function(_0x4e5063,_0x57e4dd){return pm2[_0x31fe('0xa')](function(_0x34696b,_0x3a7043){if(_0x34696b){return _0x57e4dd(_0x34696b);}pm2[_0x31fe('0x6')]();return _0x4e5063(_0x3a7043);});});});};exports['describe']=function(_0x102a46){return connect()[_0x31fe('0x8')](function(){return new BPromise(function(_0x44575a,_0x17472b){return pm2[_0x31fe('0xb')](_0x102a46,function(_0x3a48e4,_0x417905){if(_0x3a48e4){return _0x17472b(_0x3a48e4);}pm2[_0x31fe('0x6')]();return _0x44575a(_0x417905);});});});};exports[_0x31fe('0xc')]=function(_0x1d0231){return connect()[_0x31fe('0x8')](function(){return new BPromise(function(_0x2332c7,_0x2f7c6f){return pm2[_0x31fe('0xc')](_0x1d0231,function(_0xf3a44c,_0x204b62){if(_0xf3a44c){return _0x2f7c6f(_0xf3a44c);}pm2['disconnect']();return _0x2332c7(_0x204b62);});});});};exports[_0x31fe('0xd')]=function(){return connect()[_0x31fe('0x8')](function(){return new BPromise(function(_0xa47606,_0x1c60e2){return pm2[_0x31fe('0xd')](function(_0x4ba5b1){if(_0x4ba5b1){return _0x1c60e2(_0x4ba5b1);}return _0xa47606(_0x31fe('0xe'));});});});};