Built motion from commit 1fa89557.|2.6.10
[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 _0x9e32=['then','disconnect','stop','restart','list','describe','delete','dump','pm2','bluebird','./config','connect','connected','start'];(function(_0x594ece,_0x2a1f27){var _0x471bc4=function(_0x31941c){while(--_0x31941c){_0x594ece['push'](_0x594ece['shift']());}};_0x471bc4(++_0x2a1f27);}(_0x9e32,0xb0));var _0x29e3=function(_0x21a098,_0x204c09){_0x21a098=_0x21a098-0x0;var _0x3233a5=_0x9e32[_0x21a098];return _0x3233a5;};'use strict';var pm2=require(_0x29e3('0x0'));var BPromise=require(_0x29e3('0x1'));var config=require(_0x29e3('0x2'));function connect(){return new BPromise(function(_0x952a6b,_0x91310f){return pm2[_0x29e3('0x3')](function(_0x558fe6){if(_0x558fe6){return _0x91310f(_0x558fe6);}return _0x952a6b(_0x29e3('0x4'));});});};exports[_0x29e3('0x5')]=function(_0x1ef9cd){return connect()[_0x29e3('0x6')](function(){return new BPromise(function(_0x36425a,_0x59f712){return pm2[_0x29e3('0x5')](_0x1ef9cd,function(_0x53ef18,_0x4d7471){if(_0x53ef18){return _0x59f712(_0x53ef18);}pm2[_0x29e3('0x7')]();return _0x36425a(_0x4d7471);});});});};exports[_0x29e3('0x8')]=function(_0x2392e3){return connect()[_0x29e3('0x6')](function(){return new BPromise(function(_0x37b1a8,_0x46707a){return pm2[_0x29e3('0x8')](_0x2392e3,function(_0x66423f,_0x49f074){if(_0x66423f){return _0x46707a(_0x66423f);}pm2[_0x29e3('0x7')]();return _0x37b1a8(_0x49f074);});});});};exports[_0x29e3('0x9')]=function(_0x5de4a7){return connect()[_0x29e3('0x6')](function(){return new BPromise(function(_0x3a0abc,_0x78ded0){return pm2['restart'](_0x5de4a7,function(_0x5dbcdc,_0x4a1973){if(_0x5dbcdc){return _0x78ded0(_0x5dbcdc);}pm2[_0x29e3('0x7')]();return _0x3a0abc(_0x4a1973);});});});};exports[_0x29e3('0xa')]=function(){return connect()[_0x29e3('0x6')](function(){return new BPromise(function(_0x5528f1,_0x175c15){return pm2[_0x29e3('0xa')](function(_0x116afb,_0xaf8493){if(_0x116afb){return _0x175c15(_0x116afb);}pm2['disconnect']();return _0x5528f1(_0xaf8493);});});});};exports[_0x29e3('0xb')]=function(_0x1c4ca2){return connect()[_0x29e3('0x6')](function(){return new BPromise(function(_0x120dfb,_0xc0b488){return pm2[_0x29e3('0xb')](_0x1c4ca2,function(_0x417c56,_0x441295){if(_0x417c56){return _0xc0b488(_0x417c56);}pm2[_0x29e3('0x7')]();return _0x120dfb(_0x441295);});});});};exports[_0x29e3('0xc')]=function(_0x476cf6){return connect()[_0x29e3('0x6')](function(){return new BPromise(function(_0x3bf81b,_0xe5e027){return pm2[_0x29e3('0xc')](_0x476cf6,function(_0x4ed33e,_0x57a8d4){if(_0x4ed33e){return _0xe5e027(_0x4ed33e);}pm2[_0x29e3('0x7')]();return _0x3bf81b(_0x57a8d4);});});});};exports[_0x29e3('0xd')]=function(){return connect()['then'](function(){return new BPromise(function(_0x4d0cba,_0xf10775){return pm2[_0x29e3('0xd')](function(_0x694ed){if(_0x694ed){return _0xf10775(_0x694ed);}return _0x4d0cba('saved');});});});};