Built motion from commit 85328c08.|2.5.50
[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 _0x9176=['restart','list','describe','delete','dump','saved','pm2','./config','start','then','disconnect','stop'];(function(_0x117f85,_0x5afa65){var _0x1c61a7=function(_0x5be223){while(--_0x5be223){_0x117f85['push'](_0x117f85['shift']());}};_0x1c61a7(++_0x5afa65);}(_0x9176,0xae));var _0x6917=function(_0x1da3ef,_0x5a9bd8){_0x1da3ef=_0x1da3ef-0x0;var _0x33bf12=_0x9176[_0x1da3ef];return _0x33bf12;};'use strict';var pm2=require(_0x6917('0x0'));var BPromise=require('bluebird');var config=require(_0x6917('0x1'));function connect(){return new BPromise(function(_0x4d42de,_0x3982a4){return pm2['connect'](function(_0x5c01d3){if(_0x5c01d3){return _0x3982a4(_0x5c01d3);}return _0x4d42de('connected');});});};exports[_0x6917('0x2')]=function(_0x203043){return connect()[_0x6917('0x3')](function(){return new BPromise(function(_0x24489a,_0x26e0ea){return pm2[_0x6917('0x2')](_0x203043,function(_0x137a77,_0x1814a6){if(_0x137a77){return _0x26e0ea(_0x137a77);}pm2[_0x6917('0x4')]();return _0x24489a(_0x1814a6);});});});};exports[_0x6917('0x5')]=function(_0x3b0335){return connect()[_0x6917('0x3')](function(){return new BPromise(function(_0x222dea,_0x56f1dc){return pm2[_0x6917('0x5')](_0x3b0335,function(_0x272021,_0xfffbd1){if(_0x272021){return _0x56f1dc(_0x272021);}pm2[_0x6917('0x4')]();return _0x222dea(_0xfffbd1);});});});};exports['restart']=function(_0x53886b){return connect()[_0x6917('0x3')](function(){return new BPromise(function(_0x14139c,_0x248dbf){return pm2[_0x6917('0x6')](_0x53886b,function(_0x54fad4,_0x331d1d){if(_0x54fad4){return _0x248dbf(_0x54fad4);}pm2[_0x6917('0x4')]();return _0x14139c(_0x331d1d);});});});};exports[_0x6917('0x7')]=function(){return connect()[_0x6917('0x3')](function(){return new BPromise(function(_0x4e546b,_0x37ccdf){return pm2['list'](function(_0x2ab82f,_0x81ea4b){if(_0x2ab82f){return _0x37ccdf(_0x2ab82f);}pm2[_0x6917('0x4')]();return _0x4e546b(_0x81ea4b);});});});};exports['describe']=function(_0x41f8b){return connect()['then'](function(){return new BPromise(function(_0x52ccc7,_0x5ad9ac){return pm2[_0x6917('0x8')](_0x41f8b,function(_0x18a672,_0x7c6b72){if(_0x18a672){return _0x5ad9ac(_0x18a672);}pm2[_0x6917('0x4')]();return _0x52ccc7(_0x7c6b72);});});});};exports[_0x6917('0x9')]=function(_0x4708ff){return connect()[_0x6917('0x3')](function(){return new BPromise(function(_0x388a86,_0x540e47){return pm2[_0x6917('0x9')](_0x4708ff,function(_0x3dfa92,_0x156513){if(_0x3dfa92){return _0x540e47(_0x3dfa92);}pm2['disconnect']();return _0x388a86(_0x156513);});});});};exports['dump']=function(){return connect()[_0x6917('0x3')](function(){return new BPromise(function(_0x11b530,_0x577317){return pm2[_0x6917('0xa')](function(_0x199548){if(_0x199548){return _0x577317(_0x199548);}return _0x11b530(_0x6917('0xb'));});});});};