2a3e34fa8e26a3a9adc3d896b4c2375c2f721b32
[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 _0xd311=['then','disconnect','stop','restart','list','delete','saved','pm2','bluebird','./config','connect','connected'];(function(_0x14b1e9,_0xdef18c){var _0x132088=function(_0x17e3ba){while(--_0x17e3ba){_0x14b1e9['push'](_0x14b1e9['shift']());}};_0x132088(++_0xdef18c);}(_0xd311,0x1c3));var _0x1d31=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0xd311[_0x321bb2];return _0x9c12ed;};'use strict';var pm2=require(_0x1d31('0x0'));var BPromise=require(_0x1d31('0x1'));var config=require(_0x1d31('0x2'));function connect(){return new BPromise(function(_0x5db1da,_0x2cfac9){return pm2[_0x1d31('0x3')](function(_0x3b12c8){if(_0x3b12c8){return _0x2cfac9(_0x3b12c8);}return _0x5db1da(_0x1d31('0x4'));});});};exports['start']=function(_0x4f4a0d){return connect()[_0x1d31('0x5')](function(){return new BPromise(function(_0xe18062,_0x5e333b){return pm2['start'](_0x4f4a0d,function(_0x3add34,_0x30d96b){if(_0x3add34){return _0x5e333b(_0x3add34);}pm2[_0x1d31('0x6')]();return _0xe18062(_0x30d96b);});});});};exports[_0x1d31('0x7')]=function(_0x425e74){return connect()[_0x1d31('0x5')](function(){return new BPromise(function(_0x52875b,_0x1f2acd){return pm2[_0x1d31('0x7')](_0x425e74,function(_0x2b3999,_0x509f9e){if(_0x2b3999){return _0x1f2acd(_0x2b3999);}pm2[_0x1d31('0x6')]();return _0x52875b(_0x509f9e);});});});};exports[_0x1d31('0x8')]=function(_0x43c893){return connect()[_0x1d31('0x5')](function(){return new BPromise(function(_0xd8e64d,_0x4def55){return pm2[_0x1d31('0x8')](_0x43c893,function(_0x3b6ee3,_0x1e4821){if(_0x3b6ee3){return _0x4def55(_0x3b6ee3);}pm2['disconnect']();return _0xd8e64d(_0x1e4821);});});});};exports[_0x1d31('0x9')]=function(){return connect()[_0x1d31('0x5')](function(){return new BPromise(function(_0x1d6089,_0x4f6cfb){return pm2['list'](function(_0x1e7faf,_0x45c076){if(_0x1e7faf){return _0x4f6cfb(_0x1e7faf);}pm2[_0x1d31('0x6')]();return _0x1d6089(_0x45c076);});});});};exports['describe']=function(_0x31f2c9){return connect()[_0x1d31('0x5')](function(){return new BPromise(function(_0x3df46d,_0x5df49e){return pm2['describe'](_0x31f2c9,function(_0x3318b7,_0x287461){if(_0x3318b7){return _0x5df49e(_0x3318b7);}pm2[_0x1d31('0x6')]();return _0x3df46d(_0x287461);});});});};exports[_0x1d31('0xa')]=function(_0x5dee46){return connect()[_0x1d31('0x5')](function(){return new BPromise(function(_0x1c0690,_0x46d804){return pm2['delete'](_0x5dee46,function(_0x1bcec3,_0x36477){if(_0x1bcec3){return _0x46d804(_0x1bcec3);}pm2[_0x1d31('0x6')]();return _0x1c0690(_0x36477);});});});};exports['dump']=function(){return connect()[_0x1d31('0x5')](function(){return new BPromise(function(_0x44b088,_0x4d6cc9){return pm2['dump'](function(_0x1e0a63){if(_0x1e0a63){return _0x4d6cc9(_0x1e0a63);}return _0x44b088(_0x1d31('0xb'));});});});};