Built motion from commit 616d3211.|2.6.4
[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 _0x9847=['disconnect','restart','list','describe','delete','dump','saved','pm2','bluebird','./config','connect','then','stop'];(function(_0x465a0c,_0x19d4d5){var _0x1e202e=function(_0x27bd8a){while(--_0x27bd8a){_0x465a0c['push'](_0x465a0c['shift']());}};_0x1e202e(++_0x19d4d5);}(_0x9847,0x159));var _0x7984=function(_0x1e4d78,_0x4460cd){_0x1e4d78=_0x1e4d78-0x0;var _0x595a6b=_0x9847[_0x1e4d78];return _0x595a6b;};'use strict';var pm2=require(_0x7984('0x0'));var BPromise=require(_0x7984('0x1'));var config=require(_0x7984('0x2'));function connect(){return new BPromise(function(_0x4564bb,_0x17f3a3){return pm2[_0x7984('0x3')](function(_0x407a61){if(_0x407a61){return _0x17f3a3(_0x407a61);}return _0x4564bb('connected');});});};exports['start']=function(_0x1e64c3){return connect()[_0x7984('0x4')](function(){return new BPromise(function(_0x3220c4,_0x12840d){return pm2['start'](_0x1e64c3,function(_0x3134a4,_0x1966d5){if(_0x3134a4){return _0x12840d(_0x3134a4);}pm2['disconnect']();return _0x3220c4(_0x1966d5);});});});};exports[_0x7984('0x5')]=function(_0x5f54f6){return connect()[_0x7984('0x4')](function(){return new BPromise(function(_0x3685f1,_0x1b6f39){return pm2[_0x7984('0x5')](_0x5f54f6,function(_0x522745,_0x3d2d80){if(_0x522745){return _0x1b6f39(_0x522745);}pm2[_0x7984('0x6')]();return _0x3685f1(_0x3d2d80);});});});};exports[_0x7984('0x7')]=function(_0x2e3745){return connect()['then'](function(){return new BPromise(function(_0x182f36,_0x61d2e1){return pm2[_0x7984('0x7')](_0x2e3745,function(_0x3977eb,_0x1ac77f){if(_0x3977eb){return _0x61d2e1(_0x3977eb);}pm2['disconnect']();return _0x182f36(_0x1ac77f);});});});};exports[_0x7984('0x8')]=function(){return connect()[_0x7984('0x4')](function(){return new BPromise(function(_0x2bb150,_0x520fc6){return pm2[_0x7984('0x8')](function(_0x3798e0,_0x41759a){if(_0x3798e0){return _0x520fc6(_0x3798e0);}pm2[_0x7984('0x6')]();return _0x2bb150(_0x41759a);});});});};exports[_0x7984('0x9')]=function(_0x31a593){return connect()[_0x7984('0x4')](function(){return new BPromise(function(_0x57726e,_0x5d531c){return pm2[_0x7984('0x9')](_0x31a593,function(_0x1f45aa,_0x964d12){if(_0x1f45aa){return _0x5d531c(_0x1f45aa);}pm2[_0x7984('0x6')]();return _0x57726e(_0x964d12);});});});};exports[_0x7984('0xa')]=function(_0x2efe83){return connect()['then'](function(){return new BPromise(function(_0x2c2551,_0x4616e7){return pm2[_0x7984('0xa')](_0x2efe83,function(_0x360095,_0xdfc1f){if(_0x360095){return _0x4616e7(_0x360095);}pm2[_0x7984('0x6')]();return _0x2c2551(_0xdfc1f);});});});};exports[_0x7984('0xb')]=function(){return connect()[_0x7984('0x4')](function(){return new BPromise(function(_0x9d80b9,_0x294da4){return pm2[_0x7984('0xb')](function(_0x3a0008){if(_0x3a0008){return _0x294da4(_0x3a0008);}return _0x9d80b9(_0x7984('0xc'));});});});};