Built motion from commit 9d1906d1.|2.5.40
[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 _0x77a9=['disconnect','stop','restart','list','describe','delete','dump','saved','pm2','./config','connect','connected','then','start'];(function(_0x486c14,_0x22542d){var _0x1d3ff9=function(_0x3150ef){while(--_0x3150ef){_0x486c14['push'](_0x486c14['shift']());}};_0x1d3ff9(++_0x22542d);}(_0x77a9,0x19e));var _0x977a=function(_0x528494,_0x27a395){_0x528494=_0x528494-0x0;var _0x3cc379=_0x77a9[_0x528494];return _0x3cc379;};'use strict';var pm2=require(_0x977a('0x0'));var BPromise=require('bluebird');var config=require(_0x977a('0x1'));function connect(){return new BPromise(function(_0x5bf16f,_0x15eb44){return pm2[_0x977a('0x2')](function(_0x3807f1){if(_0x3807f1){return _0x15eb44(_0x3807f1);}return _0x5bf16f(_0x977a('0x3'));});});};exports['start']=function(_0x318fc8){return connect()[_0x977a('0x4')](function(){return new BPromise(function(_0x3e2b27,_0x2b4ba5){return pm2[_0x977a('0x5')](_0x318fc8,function(_0x579e03,_0x51950c){if(_0x579e03){return _0x2b4ba5(_0x579e03);}pm2[_0x977a('0x6')]();return _0x3e2b27(_0x51950c);});});});};exports[_0x977a('0x7')]=function(_0x5ac9c7){return connect()[_0x977a('0x4')](function(){return new BPromise(function(_0x61fd3c,_0xb29d7c){return pm2[_0x977a('0x7')](_0x5ac9c7,function(_0x279857,_0x218cce){if(_0x279857){return _0xb29d7c(_0x279857);}pm2[_0x977a('0x6')]();return _0x61fd3c(_0x218cce);});});});};exports[_0x977a('0x8')]=function(_0x37c9e6){return connect()[_0x977a('0x4')](function(){return new BPromise(function(_0x5076ad,_0x401731){return pm2[_0x977a('0x8')](_0x37c9e6,function(_0x2a936f,_0x3c9281){if(_0x2a936f){return _0x401731(_0x2a936f);}pm2[_0x977a('0x6')]();return _0x5076ad(_0x3c9281);});});});};exports[_0x977a('0x9')]=function(){return connect()[_0x977a('0x4')](function(){return new BPromise(function(_0x2fc086,_0x3d46ba){return pm2[_0x977a('0x9')](function(_0x586f56,_0x6b3627){if(_0x586f56){return _0x3d46ba(_0x586f56);}pm2['disconnect']();return _0x2fc086(_0x6b3627);});});});};exports[_0x977a('0xa')]=function(_0x237946){return connect()['then'](function(){return new BPromise(function(_0x11a0ab,_0x432c16){return pm2[_0x977a('0xa')](_0x237946,function(_0x1478d0,_0x5a352c){if(_0x1478d0){return _0x432c16(_0x1478d0);}pm2[_0x977a('0x6')]();return _0x11a0ab(_0x5a352c);});});});};exports[_0x977a('0xb')]=function(_0x2d47a0){return connect()['then'](function(){return new BPromise(function(_0x3e7dac,_0x20b70b){return pm2['delete'](_0x2d47a0,function(_0x40dd00,_0x5bb56d){if(_0x40dd00){return _0x20b70b(_0x40dd00);}pm2[_0x977a('0x6')]();return _0x3e7dac(_0x5bb56d);});});});};exports[_0x977a('0xc')]=function(){return connect()[_0x977a('0x4')](function(){return new BPromise(function(_0xcbb2df,_0x40ea51){return pm2['dump'](function(_0x115ea7){if(_0x115ea7){return _0x40ea51(_0x115ea7);}return _0xcbb2df(_0x977a('0xd'));});});});};