Built motion from commit (unavailable).|2.5.14
[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 _0xd053=['delete','dump','saved','pm2','bluebird','connect','start','disconnect','stop','then','restart','list'];(function(_0x59f0dc,_0x1e2497){var _0x5b5445=function(_0x57ca91){while(--_0x57ca91){_0x59f0dc['push'](_0x59f0dc['shift']());}};_0x5b5445(++_0x1e2497);}(_0xd053,0xe7));var _0x3d05=function(_0x1fb038,_0xc3f69b){_0x1fb038=_0x1fb038-0x0;var _0x1600dc=_0xd053[_0x1fb038];return _0x1600dc;};'use strict';var pm2=require(_0x3d05('0x0'));var BPromise=require(_0x3d05('0x1'));var config=require('./config');function connect(){return new BPromise(function(_0xee24bb,_0x35cdb1){return pm2[_0x3d05('0x2')](function(_0x55090d){if(_0x55090d){return _0x35cdb1(_0x55090d);}return _0xee24bb('connected');});});};exports[_0x3d05('0x3')]=function(_0x1fc866){return connect()['then'](function(){return new BPromise(function(_0x1e8c29,_0x2ba33b){return pm2['start'](_0x1fc866,function(_0x2bb04f,_0x10f771){if(_0x2bb04f){return _0x2ba33b(_0x2bb04f);}pm2[_0x3d05('0x4')]();return _0x1e8c29(_0x10f771);});});});};exports[_0x3d05('0x5')]=function(_0x36230f){return connect()[_0x3d05('0x6')](function(){return new BPromise(function(_0x330f7b,_0x13b83a){return pm2[_0x3d05('0x5')](_0x36230f,function(_0x16d3f1,_0x3d2db6){if(_0x16d3f1){return _0x13b83a(_0x16d3f1);}pm2['disconnect']();return _0x330f7b(_0x3d2db6);});});});};exports[_0x3d05('0x7')]=function(_0x3a9bd2){return connect()[_0x3d05('0x6')](function(){return new BPromise(function(_0x1b5126,_0xadbe49){return pm2[_0x3d05('0x7')](_0x3a9bd2,function(_0x1d3132,_0x1ab1dd){if(_0x1d3132){return _0xadbe49(_0x1d3132);}pm2[_0x3d05('0x4')]();return _0x1b5126(_0x1ab1dd);});});});};exports['list']=function(){return connect()[_0x3d05('0x6')](function(){return new BPromise(function(_0x2d62d7,_0x34f8b5){return pm2[_0x3d05('0x8')](function(_0x560aae,_0x4b3287){if(_0x560aae){return _0x34f8b5(_0x560aae);}pm2['disconnect']();return _0x2d62d7(_0x4b3287);});});});};exports['describe']=function(_0x41f12c){return connect()['then'](function(){return new BPromise(function(_0x20a85c,_0x5bd384){return pm2['describe'](_0x41f12c,function(_0x1419b4,_0x3389e5){if(_0x1419b4){return _0x5bd384(_0x1419b4);}pm2[_0x3d05('0x4')]();return _0x20a85c(_0x3389e5);});});});};exports[_0x3d05('0x9')]=function(_0x18ffa0){return connect()[_0x3d05('0x6')](function(){return new BPromise(function(_0x21994c,_0x43e829){return pm2[_0x3d05('0x9')](_0x18ffa0,function(_0xcf3bac,_0x9ad24a){if(_0xcf3bac){return _0x43e829(_0xcf3bac);}pm2[_0x3d05('0x4')]();return _0x21994c(_0x9ad24a);});});});};exports['dump']=function(){return connect()[_0x3d05('0x6')](function(){return new BPromise(function(_0x4adae2,_0x32071c){return pm2[_0x3d05('0xa')](function(_0x12f54c){if(_0x12f54c){return _0x32071c(_0x12f54c);}return _0x4adae2(_0x3d05('0xb'));});});});};