fa68a1e1ef03c14e6d87dbabb68926a57abe6fd6
[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 _0x3406=['list','describe','delete','dump','saved','pm2','bluebird','connect','connected','start','then','disconnect','stop','restart'];(function(_0x3b46ca,_0x408e4b){var _0x21aea2=function(_0x2df6c1){while(--_0x2df6c1){_0x3b46ca['push'](_0x3b46ca['shift']());}};_0x21aea2(++_0x408e4b);}(_0x3406,0x1b7));var _0x6340=function(_0x2ea199,_0x1636ad){_0x2ea199=_0x2ea199-0x0;var _0x16adb7=_0x3406[_0x2ea199];return _0x16adb7;};'use strict';var pm2=require(_0x6340('0x0'));var BPromise=require(_0x6340('0x1'));var config=require('./config');function connect(){return new BPromise(function(_0x261724,_0x59d914){return pm2[_0x6340('0x2')](function(_0x1f1649){if(_0x1f1649){return _0x59d914(_0x1f1649);}return _0x261724(_0x6340('0x3'));});});};exports[_0x6340('0x4')]=function(_0x50b770){return connect()[_0x6340('0x5')](function(){return new BPromise(function(_0x4650e4,_0x3bf069){return pm2[_0x6340('0x4')](_0x50b770,function(_0x409840,_0x128d63){if(_0x409840){return _0x3bf069(_0x409840);}pm2[_0x6340('0x6')]();return _0x4650e4(_0x128d63);});});});};exports[_0x6340('0x7')]=function(_0x13aefa){return connect()['then'](function(){return new BPromise(function(_0x1f5268,_0x53357f){return pm2[_0x6340('0x7')](_0x13aefa,function(_0xadbb9e,_0x5e20b6){if(_0xadbb9e){return _0x53357f(_0xadbb9e);}pm2[_0x6340('0x6')]();return _0x1f5268(_0x5e20b6);});});});};exports['restart']=function(_0x43506c){return connect()[_0x6340('0x5')](function(){return new BPromise(function(_0x30b553,_0x25c8a0){return pm2[_0x6340('0x8')](_0x43506c,function(_0x17c0dc,_0x3c732a){if(_0x17c0dc){return _0x25c8a0(_0x17c0dc);}pm2[_0x6340('0x6')]();return _0x30b553(_0x3c732a);});});});};exports[_0x6340('0x9')]=function(){return connect()['then'](function(){return new BPromise(function(_0xd4065b,_0x6d4555){return pm2['list'](function(_0x43633f,_0x15d08f){if(_0x43633f){return _0x6d4555(_0x43633f);}pm2[_0x6340('0x6')]();return _0xd4065b(_0x15d08f);});});});};exports['describe']=function(_0x2f2cd7){return connect()[_0x6340('0x5')](function(){return new BPromise(function(_0x26dceb,_0x1bf5bc){return pm2[_0x6340('0xa')](_0x2f2cd7,function(_0x33b10f,_0x237edb){if(_0x33b10f){return _0x1bf5bc(_0x33b10f);}pm2[_0x6340('0x6')]();return _0x26dceb(_0x237edb);});});});};exports['delete']=function(_0x569121){return connect()[_0x6340('0x5')](function(){return new BPromise(function(_0x5c1856,_0x45391f){return pm2[_0x6340('0xb')](_0x569121,function(_0xe97094,_0x403d64){if(_0xe97094){return _0x45391f(_0xe97094);}pm2[_0x6340('0x6')]();return _0x5c1856(_0x403d64);});});});};exports[_0x6340('0xc')]=function(){return connect()[_0x6340('0x5')](function(){return new BPromise(function(_0x3d1607,_0x62444c){return pm2[_0x6340('0xc')](function(_0x3d1876){if(_0x3d1876){return _0x62444c(_0x3d1876);}return _0x3d1607(_0x6340('0xd'));});});});};