Built motion from commit (unavailable).|2.4.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 _0x9c44=['describe','delete','dump','saved','./config','connect','connected','then','start','disconnect','restart','list'];(function(_0x1778e1,_0x3e1727){var _0x2bc4c6=function(_0x359c65){while(--_0x359c65){_0x1778e1['push'](_0x1778e1['shift']());}};_0x2bc4c6(++_0x3e1727);}(_0x9c44,0x178));var _0x49c4=function(_0x334841,_0x2bbc4c){_0x334841=_0x334841-0x0;var _0x5beb4b=_0x9c44[_0x334841];return _0x5beb4b;};'use strict';var pm2=require('pm2');var BPromise=require('bluebird');var config=require(_0x49c4('0x0'));function connect(){return new BPromise(function(_0x18bf2d,_0x26844b){return pm2[_0x49c4('0x1')](function(_0x455700){if(_0x455700){return _0x26844b(_0x455700);}return _0x18bf2d(_0x49c4('0x2'));});});};exports['start']=function(_0x4941f1){return connect()[_0x49c4('0x3')](function(){return new BPromise(function(_0x57effd,_0xc1278f){return pm2[_0x49c4('0x4')](_0x4941f1,function(_0x69bc41,_0x2c4e2e){if(_0x69bc41){return _0xc1278f(_0x69bc41);}pm2[_0x49c4('0x5')]();return _0x57effd(_0x2c4e2e);});});});};exports['stop']=function(_0x11c586){return connect()[_0x49c4('0x3')](function(){return new BPromise(function(_0x1d13fb,_0x4487ca){return pm2['stop'](_0x11c586,function(_0x5ab4a3,_0x451ea6){if(_0x5ab4a3){return _0x4487ca(_0x5ab4a3);}pm2[_0x49c4('0x5')]();return _0x1d13fb(_0x451ea6);});});});};exports['restart']=function(_0xb611a1){return connect()[_0x49c4('0x3')](function(){return new BPromise(function(_0x4adb3c,_0x536d42){return pm2[_0x49c4('0x6')](_0xb611a1,function(_0x6d1b08,_0x5487cd){if(_0x6d1b08){return _0x536d42(_0x6d1b08);}pm2[_0x49c4('0x5')]();return _0x4adb3c(_0x5487cd);});});});};exports[_0x49c4('0x7')]=function(){return connect()['then'](function(){return new BPromise(function(_0x1909fe,_0x280996){return pm2[_0x49c4('0x7')](function(_0x2decee,_0x12777c){if(_0x2decee){return _0x280996(_0x2decee);}pm2[_0x49c4('0x5')]();return _0x1909fe(_0x12777c);});});});};exports[_0x49c4('0x8')]=function(_0x3de397){return connect()['then'](function(){return new BPromise(function(_0x3acd06,_0x141003){return pm2[_0x49c4('0x8')](_0x3de397,function(_0x81e831,_0x2abc78){if(_0x81e831){return _0x141003(_0x81e831);}pm2['disconnect']();return _0x3acd06(_0x2abc78);});});});};exports[_0x49c4('0x9')]=function(_0x2891f4){return connect()['then'](function(){return new BPromise(function(_0x512650,_0x3c782d){return pm2[_0x49c4('0x9')](_0x2891f4,function(_0x3addb2,_0x59f29b){if(_0x3addb2){return _0x3c782d(_0x3addb2);}pm2[_0x49c4('0x5')]();return _0x512650(_0x59f29b);});});});};exports['dump']=function(){return connect()[_0x49c4('0x3')](function(){return new BPromise(function(_0x1806c2,_0xe31fcc){return pm2[_0x49c4('0xa')](function(_0x382040){if(_0x382040){return _0xe31fcc(_0x382040);}return _0x1806c2(_0x49c4('0xb'));});});});};