Built motion from commit b0a9a629.|2.6.33
[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 _0xceff=['then','start','disconnect','stop','restart','list','describe','delete','dump','saved','pm2','./config','connect','connected'];(function(_0x3a16d4,_0x23ecda){var _0x31ea9c=function(_0x35fea8){while(--_0x35fea8){_0x3a16d4['push'](_0x3a16d4['shift']());}};_0x31ea9c(++_0x23ecda);}(_0xceff,0x1e6));var _0xfcef=function(_0x4a747d,_0x3b747f){_0x4a747d=_0x4a747d-0x0;var _0x3a5b5c=_0xceff[_0x4a747d];return _0x3a5b5c;};'use strict';var pm2=require(_0xfcef('0x0'));var BPromise=require('bluebird');var config=require(_0xfcef('0x1'));function connect(){return new BPromise(function(_0x9d4fd,_0x3ac120){return pm2[_0xfcef('0x2')](function(_0x581261){if(_0x581261){return _0x3ac120(_0x581261);}return _0x9d4fd(_0xfcef('0x3'));});});};exports['start']=function(_0x33e962){return connect()[_0xfcef('0x4')](function(){return new BPromise(function(_0x448554,_0xe04955){return pm2[_0xfcef('0x5')](_0x33e962,function(_0x194fa3,_0x3fd8c8){if(_0x194fa3){return _0xe04955(_0x194fa3);}pm2[_0xfcef('0x6')]();return _0x448554(_0x3fd8c8);});});});};exports[_0xfcef('0x7')]=function(_0x1ed642){return connect()['then'](function(){return new BPromise(function(_0x119746,_0x1cf552){return pm2[_0xfcef('0x7')](_0x1ed642,function(_0x46e4d9,_0x30e59b){if(_0x46e4d9){return _0x1cf552(_0x46e4d9);}pm2[_0xfcef('0x6')]();return _0x119746(_0x30e59b);});});});};exports[_0xfcef('0x8')]=function(_0x7e702a){return connect()[_0xfcef('0x4')](function(){return new BPromise(function(_0x24c760,_0x1eca79){return pm2['restart'](_0x7e702a,function(_0x308c84,_0x5aa58c){if(_0x308c84){return _0x1eca79(_0x308c84);}pm2['disconnect']();return _0x24c760(_0x5aa58c);});});});};exports['list']=function(){return connect()[_0xfcef('0x4')](function(){return new BPromise(function(_0x5280d7,_0x44ae97){return pm2[_0xfcef('0x9')](function(_0x43dd2c,_0x15b6ae){if(_0x43dd2c){return _0x44ae97(_0x43dd2c);}pm2['disconnect']();return _0x5280d7(_0x15b6ae);});});});};exports[_0xfcef('0xa')]=function(_0x556efb){return connect()['then'](function(){return new BPromise(function(_0x594ad5,_0x3df3e9){return pm2['describe'](_0x556efb,function(_0x45e16d,_0xa49e8c){if(_0x45e16d){return _0x3df3e9(_0x45e16d);}pm2[_0xfcef('0x6')]();return _0x594ad5(_0xa49e8c);});});});};exports[_0xfcef('0xb')]=function(_0x263084){return connect()[_0xfcef('0x4')](function(){return new BPromise(function(_0x557787,_0x4e2489){return pm2[_0xfcef('0xb')](_0x263084,function(_0x462534,_0x7cdb5c){if(_0x462534){return _0x4e2489(_0x462534);}pm2[_0xfcef('0x6')]();return _0x557787(_0x7cdb5c);});});});};exports[_0xfcef('0xc')]=function(){return connect()[_0xfcef('0x4')](function(){return new BPromise(function(_0x28e2e8,_0x4c7a97){return pm2[_0xfcef('0xc')](function(_0x56191d){if(_0x56191d){return _0x4c7a97(_0x56191d);}return _0x28e2e8(_0xfcef('0xd'));});});});};