483176a856a72b92173aa0cb8b4b9be1eb0f0fdb
[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 _0xd3e5=['connected','start','disconnect','then','stop','restart','describe','delete','dump','saved','bluebird','./config','connect'];(function(_0x365f50,_0x490570){var _0x42d97d=function(_0x4b98ab){while(--_0x4b98ab){_0x365f50['push'](_0x365f50['shift']());}};_0x42d97d(++_0x490570);}(_0xd3e5,0x99));var _0x5d3e=function(_0x59ed41,_0x20b6e0){_0x59ed41=_0x59ed41-0x0;var _0x430d6d=_0xd3e5[_0x59ed41];return _0x430d6d;};'use strict';var pm2=require('pm2');var BPromise=require(_0x5d3e('0x0'));var config=require(_0x5d3e('0x1'));function connect(){return new BPromise(function(_0x42d92d,_0x4d320b){return pm2[_0x5d3e('0x2')](function(_0x2777f3){if(_0x2777f3){return _0x4d320b(_0x2777f3);}return _0x42d92d(_0x5d3e('0x3'));});});};exports['start']=function(_0x123a91){return connect()['then'](function(){return new BPromise(function(_0x1b988e,_0x136e4b){return pm2[_0x5d3e('0x4')](_0x123a91,function(_0x4cc668,_0x2046ee){if(_0x4cc668){return _0x136e4b(_0x4cc668);}pm2[_0x5d3e('0x5')]();return _0x1b988e(_0x2046ee);});});});};exports['stop']=function(_0x39e1c8){return connect()[_0x5d3e('0x6')](function(){return new BPromise(function(_0x5b66d0,_0x3fc399){return pm2[_0x5d3e('0x7')](_0x39e1c8,function(_0x217154,_0x17cefc){if(_0x217154){return _0x3fc399(_0x217154);}pm2[_0x5d3e('0x5')]();return _0x5b66d0(_0x17cefc);});});});};exports[_0x5d3e('0x8')]=function(_0x5ba422){return connect()[_0x5d3e('0x6')](function(){return new BPromise(function(_0x725aff,_0x1357c0){return pm2[_0x5d3e('0x8')](_0x5ba422,function(_0xe2561f,_0xe63b52){if(_0xe2561f){return _0x1357c0(_0xe2561f);}pm2[_0x5d3e('0x5')]();return _0x725aff(_0xe63b52);});});});};exports['list']=function(){return connect()[_0x5d3e('0x6')](function(){return new BPromise(function(_0x3742d2,_0x52ba83){return pm2['list'](function(_0x118477,_0x475574){if(_0x118477){return _0x52ba83(_0x118477);}pm2[_0x5d3e('0x5')]();return _0x3742d2(_0x475574);});});});};exports['describe']=function(_0x580df0){return connect()['then'](function(){return new BPromise(function(_0x5bcb14,_0x365b66){return pm2[_0x5d3e('0x9')](_0x580df0,function(_0x4fac8a,_0x19aa7c){if(_0x4fac8a){return _0x365b66(_0x4fac8a);}pm2['disconnect']();return _0x5bcb14(_0x19aa7c);});});});};exports[_0x5d3e('0xa')]=function(_0x8aacfb){return connect()[_0x5d3e('0x6')](function(){return new BPromise(function(_0x4c779e,_0x7c4f0e){return pm2['delete'](_0x8aacfb,function(_0xe6e2c9,_0x41f983){if(_0xe6e2c9){return _0x7c4f0e(_0xe6e2c9);}pm2[_0x5d3e('0x5')]();return _0x4c779e(_0x41f983);});});});};exports[_0x5d3e('0xb')]=function(){return connect()[_0x5d3e('0x6')](function(){return new BPromise(function(_0x214268,_0x55bb28){return pm2[_0x5d3e('0xb')](function(_0x5f2682){if(_0x5f2682){return _0x55bb28(_0x5f2682);}return _0x214268(_0x5d3e('0xc'));});});});};