fd473b5138a861aeb26c0ef8c2b39ecae81f1678
[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 _0x7ef1=['bluebird','connect','connected','start','disconnect','stop','then','restart','list','describe','delete','dump','saved','pm2'];(function(_0x502c7d,_0x2f1285){var _0x30b7ed=function(_0x2d92f3){while(--_0x2d92f3){_0x502c7d['push'](_0x502c7d['shift']());}};_0x30b7ed(++_0x2f1285);}(_0x7ef1,0x109));var _0x17ef=function(_0x251458,_0x5c3fa0){_0x251458=_0x251458-0x0;var _0x6545dc=_0x7ef1[_0x251458];return _0x6545dc;};'use strict';var pm2=require(_0x17ef('0x0'));var BPromise=require(_0x17ef('0x1'));var config=require('./config');function connect(){return new BPromise(function(_0x2e3c6f,_0x216bff){return pm2[_0x17ef('0x2')](function(_0x36873d){if(_0x36873d){return _0x216bff(_0x36873d);}return _0x2e3c6f(_0x17ef('0x3'));});});};exports['start']=function(_0x46c48c){return connect()['then'](function(){return new BPromise(function(_0x5499d1,_0x144343){return pm2[_0x17ef('0x4')](_0x46c48c,function(_0x3a8bcd,_0x1e77ab){if(_0x3a8bcd){return _0x144343(_0x3a8bcd);}pm2[_0x17ef('0x5')]();return _0x5499d1(_0x1e77ab);});});});};exports[_0x17ef('0x6')]=function(_0x343d22){return connect()[_0x17ef('0x7')](function(){return new BPromise(function(_0x2d0a49,_0x29daa5){return pm2['stop'](_0x343d22,function(_0x2d3e08,_0x1f79ed){if(_0x2d3e08){return _0x29daa5(_0x2d3e08);}pm2['disconnect']();return _0x2d0a49(_0x1f79ed);});});});};exports[_0x17ef('0x8')]=function(_0x87d234){return connect()[_0x17ef('0x7')](function(){return new BPromise(function(_0x426572,_0x350699){return pm2['restart'](_0x87d234,function(_0xd80d9f,_0x15d411){if(_0xd80d9f){return _0x350699(_0xd80d9f);}pm2[_0x17ef('0x5')]();return _0x426572(_0x15d411);});});});};exports[_0x17ef('0x9')]=function(){return connect()[_0x17ef('0x7')](function(){return new BPromise(function(_0x561b16,_0x23e905){return pm2[_0x17ef('0x9')](function(_0x1c6af3,_0x1ba80e){if(_0x1c6af3){return _0x23e905(_0x1c6af3);}pm2[_0x17ef('0x5')]();return _0x561b16(_0x1ba80e);});});});};exports['describe']=function(_0x42470f){return connect()[_0x17ef('0x7')](function(){return new BPromise(function(_0x2c8084,_0xfc63e7){return pm2[_0x17ef('0xa')](_0x42470f,function(_0x18e47e,_0x384894){if(_0x18e47e){return _0xfc63e7(_0x18e47e);}pm2[_0x17ef('0x5')]();return _0x2c8084(_0x384894);});});});};exports[_0x17ef('0xb')]=function(_0x440f56){return connect()[_0x17ef('0x7')](function(){return new BPromise(function(_0x35ba2b,_0x11c7ad){return pm2[_0x17ef('0xb')](_0x440f56,function(_0x179ae8,_0x121771){if(_0x179ae8){return _0x11c7ad(_0x179ae8);}pm2[_0x17ef('0x5')]();return _0x35ba2b(_0x121771);});});});};exports['dump']=function(){return connect()[_0x17ef('0x7')](function(){return new BPromise(function(_0x5363c5,_0x86af85){return pm2[_0x17ef('0xc')](function(_0x2481b5){if(_0x2481b5){return _0x86af85(_0x2481b5);}return _0x5363c5(_0x17ef('0xd'));});});});};