8e7d4aa74236ee953a615d0cf9041b662ba39e94
[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 _0x9e69=['connected','start','then','stop','disconnect','restart','list','describe','delete','dump','saved','pm2','bluebird','./config','connect'];(function(_0x3fe042,_0x1106f7){var _0x7d4a1f=function(_0x2df987){while(--_0x2df987){_0x3fe042['push'](_0x3fe042['shift']());}};_0x7d4a1f(++_0x1106f7);}(_0x9e69,0xce));var _0x99e6=function(_0xd2408a,_0x47983c){_0xd2408a=_0xd2408a-0x0;var _0x321c13=_0x9e69[_0xd2408a];return _0x321c13;};'use strict';var pm2=require(_0x99e6('0x0'));var BPromise=require(_0x99e6('0x1'));var config=require(_0x99e6('0x2'));function connect(){return new BPromise(function(_0x16db23,_0x2ddca0){return pm2[_0x99e6('0x3')](function(_0xd5b701){if(_0xd5b701){return _0x2ddca0(_0xd5b701);}return _0x16db23(_0x99e6('0x4'));});});};exports[_0x99e6('0x5')]=function(_0x455e4d){return connect()['then'](function(){return new BPromise(function(_0x2121f7,_0x3fc545){return pm2[_0x99e6('0x5')](_0x455e4d,function(_0x462e54,_0xd526b8){if(_0x462e54){return _0x3fc545(_0x462e54);}pm2['disconnect']();return _0x2121f7(_0xd526b8);});});});};exports['stop']=function(_0x2f2dc7){return connect()[_0x99e6('0x6')](function(){return new BPromise(function(_0x2008ea,_0x513d28){return pm2[_0x99e6('0x7')](_0x2f2dc7,function(_0x3d9b94,_0x10c496){if(_0x3d9b94){return _0x513d28(_0x3d9b94);}pm2[_0x99e6('0x8')]();return _0x2008ea(_0x10c496);});});});};exports['restart']=function(_0x4dc437){return connect()['then'](function(){return new BPromise(function(_0x19bfc6,_0x14c636){return pm2[_0x99e6('0x9')](_0x4dc437,function(_0x48fae4,_0x17b09d){if(_0x48fae4){return _0x14c636(_0x48fae4);}pm2[_0x99e6('0x8')]();return _0x19bfc6(_0x17b09d);});});});};exports[_0x99e6('0xa')]=function(){return connect()[_0x99e6('0x6')](function(){return new BPromise(function(_0x4dd793,_0x4af5d6){return pm2[_0x99e6('0xa')](function(_0x205ccd,_0x3f30e3){if(_0x205ccd){return _0x4af5d6(_0x205ccd);}pm2['disconnect']();return _0x4dd793(_0x3f30e3);});});});};exports[_0x99e6('0xb')]=function(_0x1e824b){return connect()[_0x99e6('0x6')](function(){return new BPromise(function(_0xa083cd,_0x3fd07b){return pm2[_0x99e6('0xb')](_0x1e824b,function(_0x429573,_0x42cf06){if(_0x429573){return _0x3fd07b(_0x429573);}pm2[_0x99e6('0x8')]();return _0xa083cd(_0x42cf06);});});});};exports[_0x99e6('0xc')]=function(_0xb4bc4a){return connect()['then'](function(){return new BPromise(function(_0x22b574,_0x12f9b5){return pm2[_0x99e6('0xc')](_0xb4bc4a,function(_0x7392e2,_0x43f473){if(_0x7392e2){return _0x12f9b5(_0x7392e2);}pm2[_0x99e6('0x8')]();return _0x22b574(_0x43f473);});});});};exports[_0x99e6('0xd')]=function(){return connect()[_0x99e6('0x6')](function(){return new BPromise(function(_0x311d9a,_0x2fbe80){return pm2[_0x99e6('0xd')](function(_0x3a3ccd){if(_0x3a3ccd){return _0x2fbe80(_0x3a3ccd);}return _0x311d9a(_0x99e6('0xe'));});});});};