Built motion from commit 97153652.|2.6.26
[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 _0x144d=['restart','list','describe','delete','dump','saved','pm2','./config','connected','start','then','disconnect','stop'];(function(_0x1ffc90,_0xe2e0d6){var _0x430897=function(_0x5d8d07){while(--_0x5d8d07){_0x1ffc90['push'](_0x1ffc90['shift']());}};_0x430897(++_0xe2e0d6);}(_0x144d,0x1b3));var _0xd144=function(_0x19bd7b,_0x147240){_0x19bd7b=_0x19bd7b-0x0;var _0x20985c=_0x144d[_0x19bd7b];return _0x20985c;};'use strict';var pm2=require(_0xd144('0x0'));var BPromise=require('bluebird');var config=require(_0xd144('0x1'));function connect(){return new BPromise(function(_0x518c32,_0x179937){return pm2['connect'](function(_0x192bc4){if(_0x192bc4){return _0x179937(_0x192bc4);}return _0x518c32(_0xd144('0x2'));});});};exports[_0xd144('0x3')]=function(_0x2d125e){return connect()[_0xd144('0x4')](function(){return new BPromise(function(_0x48082a,_0x3adc90){return pm2['start'](_0x2d125e,function(_0x411922,_0x2c7733){if(_0x411922){return _0x3adc90(_0x411922);}pm2[_0xd144('0x5')]();return _0x48082a(_0x2c7733);});});});};exports[_0xd144('0x6')]=function(_0x58d219){return connect()[_0xd144('0x4')](function(){return new BPromise(function(_0x2dee41,_0x2a37e4){return pm2[_0xd144('0x6')](_0x58d219,function(_0x2f8a52,_0x27dbf3){if(_0x2f8a52){return _0x2a37e4(_0x2f8a52);}pm2[_0xd144('0x5')]();return _0x2dee41(_0x27dbf3);});});});};exports['restart']=function(_0x548514){return connect()[_0xd144('0x4')](function(){return new BPromise(function(_0x219f31,_0x5962d8){return pm2[_0xd144('0x7')](_0x548514,function(_0x493ba5,_0x450705){if(_0x493ba5){return _0x5962d8(_0x493ba5);}pm2[_0xd144('0x5')]();return _0x219f31(_0x450705);});});});};exports[_0xd144('0x8')]=function(){return connect()['then'](function(){return new BPromise(function(_0x2d855f,_0x256a6c){return pm2[_0xd144('0x8')](function(_0x5bb207,_0x5a9dcd){if(_0x5bb207){return _0x256a6c(_0x5bb207);}pm2['disconnect']();return _0x2d855f(_0x5a9dcd);});});});};exports[_0xd144('0x9')]=function(_0x5269fb){return connect()[_0xd144('0x4')](function(){return new BPromise(function(_0x5bfe51,_0x2cb6ad){return pm2[_0xd144('0x9')](_0x5269fb,function(_0xf9af11,_0x1bc276){if(_0xf9af11){return _0x2cb6ad(_0xf9af11);}pm2[_0xd144('0x5')]();return _0x5bfe51(_0x1bc276);});});});};exports[_0xd144('0xa')]=function(_0x53a4a3){return connect()[_0xd144('0x4')](function(){return new BPromise(function(_0x23ee50,_0x35dfe9){return pm2['delete'](_0x53a4a3,function(_0x378529,_0x5b5211){if(_0x378529){return _0x35dfe9(_0x378529);}pm2['disconnect']();return _0x23ee50(_0x5b5211);});});});};exports[_0xd144('0xb')]=function(){return connect()['then'](function(){return new BPromise(function(_0x1aeb2b,_0x1ea74e){return pm2['dump'](function(_0x5a31c4){if(_0x5a31c4){return _0x1ea74e(_0x5a31c4);}return _0x1aeb2b(_0xd144('0xc'));});});});};