Built motion from commit 775e2a94.|2.6.3
[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 _0xce32=['pm2','bluebird','./config','connect','connected','start','then','disconnect','stop','restart','list','describe','delete','dump','saved'];(function(_0x4f96f0,_0x52d284){var _0x185ee5=function(_0x1c4a8c){while(--_0x1c4a8c){_0x4f96f0['push'](_0x4f96f0['shift']());}};_0x185ee5(++_0x52d284);}(_0xce32,0x14a));var _0x2ce3=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xce32[_0x3dd15e];return _0x231fd0;};'use strict';var pm2=require(_0x2ce3('0x0'));var BPromise=require(_0x2ce3('0x1'));var config=require(_0x2ce3('0x2'));function connect(){return new BPromise(function(_0x40736d,_0x3cf9ec){return pm2[_0x2ce3('0x3')](function(_0x1a87a5){if(_0x1a87a5){return _0x3cf9ec(_0x1a87a5);}return _0x40736d(_0x2ce3('0x4'));});});};exports[_0x2ce3('0x5')]=function(_0x2b71d8){return connect()[_0x2ce3('0x6')](function(){return new BPromise(function(_0xacc918,_0x4c6e23){return pm2[_0x2ce3('0x5')](_0x2b71d8,function(_0x80d759,_0x6a4f54){if(_0x80d759){return _0x4c6e23(_0x80d759);}pm2[_0x2ce3('0x7')]();return _0xacc918(_0x6a4f54);});});});};exports[_0x2ce3('0x8')]=function(_0x531ddf){return connect()[_0x2ce3('0x6')](function(){return new BPromise(function(_0x218e13,_0x409316){return pm2['stop'](_0x531ddf,function(_0x40696d,_0x2309e2){if(_0x40696d){return _0x409316(_0x40696d);}pm2[_0x2ce3('0x7')]();return _0x218e13(_0x2309e2);});});});};exports[_0x2ce3('0x9')]=function(_0x1df58e){return connect()[_0x2ce3('0x6')](function(){return new BPromise(function(_0x581fbf,_0x496e67){return pm2[_0x2ce3('0x9')](_0x1df58e,function(_0x455fc2,_0x5b5714){if(_0x455fc2){return _0x496e67(_0x455fc2);}pm2[_0x2ce3('0x7')]();return _0x581fbf(_0x5b5714);});});});};exports['list']=function(){return connect()[_0x2ce3('0x6')](function(){return new BPromise(function(_0x5228c2,_0x3c0746){return pm2[_0x2ce3('0xa')](function(_0x2b5c45,_0x557f84){if(_0x2b5c45){return _0x3c0746(_0x2b5c45);}pm2[_0x2ce3('0x7')]();return _0x5228c2(_0x557f84);});});});};exports[_0x2ce3('0xb')]=function(_0xb49924){return connect()[_0x2ce3('0x6')](function(){return new BPromise(function(_0x486f28,_0x132f2e){return pm2[_0x2ce3('0xb')](_0xb49924,function(_0x48fcb7,_0x79ef6f){if(_0x48fcb7){return _0x132f2e(_0x48fcb7);}pm2['disconnect']();return _0x486f28(_0x79ef6f);});});});};exports[_0x2ce3('0xc')]=function(_0x4fc5cf){return connect()[_0x2ce3('0x6')](function(){return new BPromise(function(_0x3e4b66,_0x5f2061){return pm2[_0x2ce3('0xc')](_0x4fc5cf,function(_0x29cdbf,_0x59b3fa){if(_0x29cdbf){return _0x5f2061(_0x29cdbf);}pm2[_0x2ce3('0x7')]();return _0x3e4b66(_0x59b3fa);});});});};exports['dump']=function(){return connect()['then'](function(){return new BPromise(function(_0x1de0dd,_0x5c3fc9){return pm2[_0x2ce3('0xd')](function(_0x2ef213){if(_0x2ef213){return _0x5c3fc9(_0x2ef213);}return _0x1de0dd(_0x2ce3('0xe'));});});});};