d74cc8c2a3aebae6c1d3d67677f831384dfb4200
[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 _0xb8f1=['describe','dump','saved','pm2','bluebird','connected','start','then','disconnect','stop','restart','list'];(function(_0x4f6d9d,_0x15c242){var _0x1b599b=function(_0xc7e7b5){while(--_0xc7e7b5){_0x4f6d9d['push'](_0x4f6d9d['shift']());}};_0x1b599b(++_0x15c242);}(_0xb8f1,0x15f));var _0x1b8f=function(_0x5bb5cd,_0x3b4bdb){_0x5bb5cd=_0x5bb5cd-0x0;var _0x2807c4=_0xb8f1[_0x5bb5cd];return _0x2807c4;};'use strict';var pm2=require(_0x1b8f('0x0'));var BPromise=require(_0x1b8f('0x1'));var config=require('./config');function connect(){return new BPromise(function(_0x210bb2,_0x45e701){return pm2['connect'](function(_0x512991){if(_0x512991){return _0x45e701(_0x512991);}return _0x210bb2(_0x1b8f('0x2'));});});};exports[_0x1b8f('0x3')]=function(_0x3cceee){return connect()[_0x1b8f('0x4')](function(){return new BPromise(function(_0xf7f618,_0x63e83){return pm2[_0x1b8f('0x3')](_0x3cceee,function(_0x568a22,_0x515dac){if(_0x568a22){return _0x63e83(_0x568a22);}pm2[_0x1b8f('0x5')]();return _0xf7f618(_0x515dac);});});});};exports[_0x1b8f('0x6')]=function(_0x3cd360){return connect()['then'](function(){return new BPromise(function(_0x23e467,_0x2556aa){return pm2[_0x1b8f('0x6')](_0x3cd360,function(_0x2b5be4,_0x5a1cd1){if(_0x2b5be4){return _0x2556aa(_0x2b5be4);}pm2[_0x1b8f('0x5')]();return _0x23e467(_0x5a1cd1);});});});};exports[_0x1b8f('0x7')]=function(_0x598159){return connect()[_0x1b8f('0x4')](function(){return new BPromise(function(_0x2be8a2,_0x28c741){return pm2['restart'](_0x598159,function(_0x1743cd,_0xd2fc66){if(_0x1743cd){return _0x28c741(_0x1743cd);}pm2[_0x1b8f('0x5')]();return _0x2be8a2(_0xd2fc66);});});});};exports[_0x1b8f('0x8')]=function(){return connect()[_0x1b8f('0x4')](function(){return new BPromise(function(_0x307350,_0x4b1ce3){return pm2[_0x1b8f('0x8')](function(_0x535d57,_0x275e69){if(_0x535d57){return _0x4b1ce3(_0x535d57);}pm2[_0x1b8f('0x5')]();return _0x307350(_0x275e69);});});});};exports[_0x1b8f('0x9')]=function(_0x13d98c){return connect()['then'](function(){return new BPromise(function(_0xc3a404,_0x10af6e){return pm2[_0x1b8f('0x9')](_0x13d98c,function(_0x3fb417,_0x51127e){if(_0x3fb417){return _0x10af6e(_0x3fb417);}pm2[_0x1b8f('0x5')]();return _0xc3a404(_0x51127e);});});});};exports['delete']=function(_0x26fce6){return connect()[_0x1b8f('0x4')](function(){return new BPromise(function(_0x59351c,_0x3f8a41){return pm2['delete'](_0x26fce6,function(_0x834ad7,_0x24fabe){if(_0x834ad7){return _0x3f8a41(_0x834ad7);}pm2[_0x1b8f('0x5')]();return _0x59351c(_0x24fabe);});});});};exports[_0x1b8f('0xa')]=function(){return connect()[_0x1b8f('0x4')](function(){return new BPromise(function(_0x365d66,_0x57c695){return pm2['dump'](function(_0x56fb61){if(_0x56fb61){return _0x57c695(_0x56fb61);}return _0x365d66(_0x1b8f('0xb'));});});});};