0e3d123fc1fcc6623aa4ec2d9ad1abc95283bce1
[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 _0xd939=['start','then','disconnect','stop','restart','list','delete','dump','saved','pm2','bluebird','./config','connect','connected'];(function(_0x3ee91e,_0x466a5a){var _0x239405=function(_0x3f2d09){while(--_0x3f2d09){_0x3ee91e['push'](_0x3ee91e['shift']());}};_0x239405(++_0x466a5a);}(_0xd939,0xb1));var _0x9d93=function(_0x171fdc,_0x16ae91){_0x171fdc=_0x171fdc-0x0;var _0x3782ea=_0xd939[_0x171fdc];return _0x3782ea;};'use strict';var pm2=require(_0x9d93('0x0'));var BPromise=require(_0x9d93('0x1'));var config=require(_0x9d93('0x2'));function connect(){return new BPromise(function(_0x989ba5,_0x3b7e99){return pm2[_0x9d93('0x3')](function(_0x43cb24){if(_0x43cb24){return _0x3b7e99(_0x43cb24);}return _0x989ba5(_0x9d93('0x4'));});});};exports[_0x9d93('0x5')]=function(_0x589e5f){return connect()[_0x9d93('0x6')](function(){return new BPromise(function(_0x276300,_0x494553){return pm2['start'](_0x589e5f,function(_0x5994bf,_0x2566fa){if(_0x5994bf){return _0x494553(_0x5994bf);}pm2[_0x9d93('0x7')]();return _0x276300(_0x2566fa);});});});};exports['stop']=function(_0x796385){return connect()[_0x9d93('0x6')](function(){return new BPromise(function(_0x3471a3,_0x4195ba){return pm2[_0x9d93('0x8')](_0x796385,function(_0x2f1dcc,_0x470302){if(_0x2f1dcc){return _0x4195ba(_0x2f1dcc);}pm2[_0x9d93('0x7')]();return _0x3471a3(_0x470302);});});});};exports[_0x9d93('0x9')]=function(_0x2a539b){return connect()[_0x9d93('0x6')](function(){return new BPromise(function(_0x68921a,_0x4f8be3){return pm2[_0x9d93('0x9')](_0x2a539b,function(_0x5e4c31,_0x351308){if(_0x5e4c31){return _0x4f8be3(_0x5e4c31);}pm2[_0x9d93('0x7')]();return _0x68921a(_0x351308);});});});};exports['list']=function(){return connect()[_0x9d93('0x6')](function(){return new BPromise(function(_0x4be464,_0x56d33f){return pm2[_0x9d93('0xa')](function(_0x58ebf5,_0x276535){if(_0x58ebf5){return _0x56d33f(_0x58ebf5);}pm2['disconnect']();return _0x4be464(_0x276535);});});});};exports['describe']=function(_0x4a299e){return connect()[_0x9d93('0x6')](function(){return new BPromise(function(_0x19a714,_0x354297){return pm2['describe'](_0x4a299e,function(_0x13ecb9,_0x16a35a){if(_0x13ecb9){return _0x354297(_0x13ecb9);}pm2[_0x9d93('0x7')]();return _0x19a714(_0x16a35a);});});});};exports[_0x9d93('0xb')]=function(_0x379ab6){return connect()[_0x9d93('0x6')](function(){return new BPromise(function(_0x2b37e6,_0x3f0f5f){return pm2[_0x9d93('0xb')](_0x379ab6,function(_0x356490,_0x24858d){if(_0x356490){return _0x3f0f5f(_0x356490);}pm2[_0x9d93('0x7')]();return _0x2b37e6(_0x24858d);});});});};exports[_0x9d93('0xc')]=function(){return connect()[_0x9d93('0x6')](function(){return new BPromise(function(_0x289253,_0x3e596d){return pm2[_0x9d93('0xc')](function(_0x3e59f7){if(_0x3e59f7){return _0x3e596d(_0x3e59f7);}return _0x289253(_0x9d93('0xd'));});});});};