Built motion from commit (unavailable).|2.5.0
[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 _0x5e0c=['stop','disconnect','restart','list','describe','delete','dump','bluebird','./config','connect','start','then'];(function(_0x495cac,_0x4ee370){var _0x336443=function(_0xd5ca6f){while(--_0xd5ca6f){_0x495cac['push'](_0x495cac['shift']());}};_0x336443(++_0x4ee370);}(_0x5e0c,0x19f));var _0xc5e0=function(_0x47d804,_0x5cc88f){_0x47d804=_0x47d804-0x0;var _0x284c47=_0x5e0c[_0x47d804];return _0x284c47;};'use strict';var pm2=require('pm2');var BPromise=require(_0xc5e0('0x0'));var config=require(_0xc5e0('0x1'));function connect(){return new BPromise(function(_0x3e355f,_0x41596c){return pm2[_0xc5e0('0x2')](function(_0x1400f3){if(_0x1400f3){return _0x41596c(_0x1400f3);}return _0x3e355f('connected');});});};exports[_0xc5e0('0x3')]=function(_0x108ea2){return connect()[_0xc5e0('0x4')](function(){return new BPromise(function(_0x2427ef,_0x665907){return pm2['start'](_0x108ea2,function(_0x4b46de,_0x12b5cb){if(_0x4b46de){return _0x665907(_0x4b46de);}pm2['disconnect']();return _0x2427ef(_0x12b5cb);});});});};exports[_0xc5e0('0x5')]=function(_0x398b67){return connect()[_0xc5e0('0x4')](function(){return new BPromise(function(_0xc7c777,_0x5ce913){return pm2[_0xc5e0('0x5')](_0x398b67,function(_0x558bbd,_0x37627e){if(_0x558bbd){return _0x5ce913(_0x558bbd);}pm2[_0xc5e0('0x6')]();return _0xc7c777(_0x37627e);});});});};exports[_0xc5e0('0x7')]=function(_0x2863e4){return connect()[_0xc5e0('0x4')](function(){return new BPromise(function(_0x44980b,_0x508d9a){return pm2[_0xc5e0('0x7')](_0x2863e4,function(_0x239620,_0x3de61c){if(_0x239620){return _0x508d9a(_0x239620);}pm2[_0xc5e0('0x6')]();return _0x44980b(_0x3de61c);});});});};exports[_0xc5e0('0x8')]=function(){return connect()['then'](function(){return new BPromise(function(_0x3d0503,_0x402f5d){return pm2['list'](function(_0x55e389,_0x2fa026){if(_0x55e389){return _0x402f5d(_0x55e389);}pm2['disconnect']();return _0x3d0503(_0x2fa026);});});});};exports['describe']=function(_0xcf0eba){return connect()[_0xc5e0('0x4')](function(){return new BPromise(function(_0x310537,_0x24700e){return pm2[_0xc5e0('0x9')](_0xcf0eba,function(_0x247138,_0x1667b9){if(_0x247138){return _0x24700e(_0x247138);}pm2[_0xc5e0('0x6')]();return _0x310537(_0x1667b9);});});});};exports[_0xc5e0('0xa')]=function(_0x1baf22){return connect()[_0xc5e0('0x4')](function(){return new BPromise(function(_0x21cf18,_0x7cdb63){return pm2[_0xc5e0('0xa')](_0x1baf22,function(_0x5c534d,_0x50db3a){if(_0x5c534d){return _0x7cdb63(_0x5c534d);}pm2[_0xc5e0('0x6')]();return _0x21cf18(_0x50db3a);});});});};exports[_0xc5e0('0xb')]=function(){return connect()[_0xc5e0('0x4')](function(){return new BPromise(function(_0x2dba3d,_0x4214b0){return pm2[_0xc5e0('0xb')](function(_0x4a07e8){if(_0x4a07e8){return _0x4214b0(_0x4a07e8);}return _0x2dba3d('saved');});});});};