07eb0acab68df73bd1def2497853135044939e9f
[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 _0x983f=['restart','list','describe','delete','dump','saved','pm2','bluebird','./config','start','then','disconnect','stop'];(function(_0x2548c5,_0x3b6156){var _0x54b194=function(_0x57ca7d){while(--_0x57ca7d){_0x2548c5['push'](_0x2548c5['shift']());}};_0x54b194(++_0x3b6156);}(_0x983f,0x13e));var _0xf983=function(_0x5e8ae4,_0x77fe95){_0x5e8ae4=_0x5e8ae4-0x0;var _0x170a28=_0x983f[_0x5e8ae4];return _0x170a28;};'use strict';var pm2=require(_0xf983('0x0'));var BPromise=require(_0xf983('0x1'));var config=require(_0xf983('0x2'));function connect(){return new BPromise(function(_0x4858bf,_0x37bb7b){return pm2['connect'](function(_0x127347){if(_0x127347){return _0x37bb7b(_0x127347);}return _0x4858bf('connected');});});};exports[_0xf983('0x3')]=function(_0x449b76){return connect()[_0xf983('0x4')](function(){return new BPromise(function(_0x1d184e,_0xb50fb0){return pm2['start'](_0x449b76,function(_0x591538,_0x311c3d){if(_0x591538){return _0xb50fb0(_0x591538);}pm2[_0xf983('0x5')]();return _0x1d184e(_0x311c3d);});});});};exports[_0xf983('0x6')]=function(_0x41a96f){return connect()['then'](function(){return new BPromise(function(_0x5b4283,_0x6709c7){return pm2[_0xf983('0x6')](_0x41a96f,function(_0x576eb3,_0x9d5782){if(_0x576eb3){return _0x6709c7(_0x576eb3);}pm2[_0xf983('0x5')]();return _0x5b4283(_0x9d5782);});});});};exports[_0xf983('0x7')]=function(_0x1b1fdd){return connect()[_0xf983('0x4')](function(){return new BPromise(function(_0x54852b,_0x276ec1){return pm2[_0xf983('0x7')](_0x1b1fdd,function(_0x247176,_0x53e00e){if(_0x247176){return _0x276ec1(_0x247176);}pm2['disconnect']();return _0x54852b(_0x53e00e);});});});};exports[_0xf983('0x8')]=function(){return connect()['then'](function(){return new BPromise(function(_0x4d281b,_0x15f2ea){return pm2['list'](function(_0x35f467,_0x5940e1){if(_0x35f467){return _0x15f2ea(_0x35f467);}pm2[_0xf983('0x5')]();return _0x4d281b(_0x5940e1);});});});};exports[_0xf983('0x9')]=function(_0x5a65e1){return connect()['then'](function(){return new BPromise(function(_0x5c87b9,_0x1b14ea){return pm2['describe'](_0x5a65e1,function(_0x1173a5,_0x42d014){if(_0x1173a5){return _0x1b14ea(_0x1173a5);}pm2[_0xf983('0x5')]();return _0x5c87b9(_0x42d014);});});});};exports[_0xf983('0xa')]=function(_0x59f3c8){return connect()['then'](function(){return new BPromise(function(_0x1ca628,_0x49d74d){return pm2[_0xf983('0xa')](_0x59f3c8,function(_0x4194a3,_0x1a7a10){if(_0x4194a3){return _0x49d74d(_0x4194a3);}pm2[_0xf983('0x5')]();return _0x1ca628(_0x1a7a10);});});});};exports[_0xf983('0xb')]=function(){return connect()['then'](function(){return new BPromise(function(_0x2beb2b,_0x164bb4){return pm2['dump'](function(_0x4773b3){if(_0x4773b3){return _0x164bb4(_0x4773b3);}return _0x2beb2b(_0xf983('0xc'));});});});};