Built motion from commit 994c64e1.|2.6.1
[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 _0xe560=['pm2','bluebird','./config','connect','connected','start','stop','then','restart','disconnect','list','describe','delete','dump','saved'];(function(_0x264103,_0x1a4278){var _0x37c074=function(_0xe4b241){while(--_0xe4b241){_0x264103['push'](_0x264103['shift']());}};_0x37c074(++_0x1a4278);}(_0xe560,0x11d));var _0x0e56=function(_0x28884c,_0x1ed6b4){_0x28884c=_0x28884c-0x0;var _0x654b52=_0xe560[_0x28884c];return _0x654b52;};'use strict';var pm2=require(_0x0e56('0x0'));var BPromise=require(_0x0e56('0x1'));var config=require(_0x0e56('0x2'));function connect(){return new BPromise(function(_0x3c1d7a,_0x5e2f6d){return pm2[_0x0e56('0x3')](function(_0x20f19d){if(_0x20f19d){return _0x5e2f6d(_0x20f19d);}return _0x3c1d7a(_0x0e56('0x4'));});});};exports[_0x0e56('0x5')]=function(_0x389748){return connect()['then'](function(){return new BPromise(function(_0x312fb4,_0x4620d6){return pm2[_0x0e56('0x5')](_0x389748,function(_0x4cd80c,_0x504060){if(_0x4cd80c){return _0x4620d6(_0x4cd80c);}pm2['disconnect']();return _0x312fb4(_0x504060);});});});};exports[_0x0e56('0x6')]=function(_0x5c060c){return connect()[_0x0e56('0x7')](function(){return new BPromise(function(_0x4a1c88,_0x22fb6f){return pm2[_0x0e56('0x6')](_0x5c060c,function(_0x52ccf7,_0x3e8fb7){if(_0x52ccf7){return _0x22fb6f(_0x52ccf7);}pm2['disconnect']();return _0x4a1c88(_0x3e8fb7);});});});};exports[_0x0e56('0x8')]=function(_0x57be68){return connect()[_0x0e56('0x7')](function(){return new BPromise(function(_0x3c1c65,_0x39102f){return pm2[_0x0e56('0x8')](_0x57be68,function(_0x5e8e60,_0x44fa0a){if(_0x5e8e60){return _0x39102f(_0x5e8e60);}pm2[_0x0e56('0x9')]();return _0x3c1c65(_0x44fa0a);});});});};exports[_0x0e56('0xa')]=function(){return connect()[_0x0e56('0x7')](function(){return new BPromise(function(_0x430a16,_0x267dba){return pm2['list'](function(_0x3f880e,_0x575597){if(_0x3f880e){return _0x267dba(_0x3f880e);}pm2[_0x0e56('0x9')]();return _0x430a16(_0x575597);});});});};exports[_0x0e56('0xb')]=function(_0x444f45){return connect()[_0x0e56('0x7')](function(){return new BPromise(function(_0xe6693a,_0x24e06a){return pm2[_0x0e56('0xb')](_0x444f45,function(_0x97d5af,_0x3d8170){if(_0x97d5af){return _0x24e06a(_0x97d5af);}pm2[_0x0e56('0x9')]();return _0xe6693a(_0x3d8170);});});});};exports[_0x0e56('0xc')]=function(_0xcba50f){return connect()['then'](function(){return new BPromise(function(_0x24dbb2,_0x388b37){return pm2[_0x0e56('0xc')](_0xcba50f,function(_0x38bbd2,_0x511661){if(_0x38bbd2){return _0x388b37(_0x38bbd2);}pm2[_0x0e56('0x9')]();return _0x24dbb2(_0x511661);});});});};exports[_0x0e56('0xd')]=function(){return connect()['then'](function(){return new BPromise(function(_0x4a34df,_0x22752d){return pm2[_0x0e56('0xd')](function(_0x3bcae0){if(_0x3bcae0){return _0x22752d(_0x3bcae0);}return _0x4a34df(_0x0e56('0xe'));});});});};