413cd0ba7074827f89d7a1b6aa00a2427e4e916c
[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 _0x67cf=['saved','pm2','bluebird','./config','connect','start','then','disconnect','stop','restart','list','describe','delete','dump'];(function(_0x2db4d5,_0x2ff676){var _0x567cb7=function(_0x367417){while(--_0x367417){_0x2db4d5['push'](_0x2db4d5['shift']());}};_0x567cb7(++_0x2ff676);}(_0x67cf,0x151));var _0xf67c=function(_0xf3e4a0,_0x16a172){_0xf3e4a0=_0xf3e4a0-0x0;var _0x43f1cc=_0x67cf[_0xf3e4a0];return _0x43f1cc;};'use strict';var pm2=require(_0xf67c('0x0'));var BPromise=require(_0xf67c('0x1'));var config=require(_0xf67c('0x2'));function connect(){return new BPromise(function(_0x50051a,_0xe32a97){return pm2[_0xf67c('0x3')](function(_0x2ff07c){if(_0x2ff07c){return _0xe32a97(_0x2ff07c);}return _0x50051a('connected');});});};exports[_0xf67c('0x4')]=function(_0x4d2a05){return connect()[_0xf67c('0x5')](function(){return new BPromise(function(_0x372ad0,_0x1a0b84){return pm2['start'](_0x4d2a05,function(_0x69d723,_0x42692c){if(_0x69d723){return _0x1a0b84(_0x69d723);}pm2[_0xf67c('0x6')]();return _0x372ad0(_0x42692c);});});});};exports[_0xf67c('0x7')]=function(_0x242757){return connect()[_0xf67c('0x5')](function(){return new BPromise(function(_0x1f69d8,_0x2def67){return pm2[_0xf67c('0x7')](_0x242757,function(_0x191d11,_0x405395){if(_0x191d11){return _0x2def67(_0x191d11);}pm2[_0xf67c('0x6')]();return _0x1f69d8(_0x405395);});});});};exports[_0xf67c('0x8')]=function(_0x36645a){return connect()[_0xf67c('0x5')](function(){return new BPromise(function(_0x3181cb,_0x51eb35){return pm2[_0xf67c('0x8')](_0x36645a,function(_0x3f43f0,_0x16aaa1){if(_0x3f43f0){return _0x51eb35(_0x3f43f0);}pm2[_0xf67c('0x6')]();return _0x3181cb(_0x16aaa1);});});});};exports[_0xf67c('0x9')]=function(){return connect()[_0xf67c('0x5')](function(){return new BPromise(function(_0x187cee,_0x589e40){return pm2[_0xf67c('0x9')](function(_0xc7c10d,_0x270c38){if(_0xc7c10d){return _0x589e40(_0xc7c10d);}pm2[_0xf67c('0x6')]();return _0x187cee(_0x270c38);});});});};exports['describe']=function(_0x18031d){return connect()[_0xf67c('0x5')](function(){return new BPromise(function(_0x2ff220,_0x5f3638){return pm2[_0xf67c('0xa')](_0x18031d,function(_0x1de5c1,_0x1b9ad4){if(_0x1de5c1){return _0x5f3638(_0x1de5c1);}pm2[_0xf67c('0x6')]();return _0x2ff220(_0x1b9ad4);});});});};exports[_0xf67c('0xb')]=function(_0x35edf0){return connect()[_0xf67c('0x5')](function(){return new BPromise(function(_0x1093e7,_0x3359dd){return pm2[_0xf67c('0xb')](_0x35edf0,function(_0x2a855c,_0x5195ed){if(_0x2a855c){return _0x3359dd(_0x2a855c);}pm2[_0xf67c('0x6')]();return _0x1093e7(_0x5195ed);});});});};exports[_0xf67c('0xc')]=function(){return connect()[_0xf67c('0x5')](function(){return new BPromise(function(_0x3b014f,_0x59ae22){return pm2[_0xf67c('0xc')](function(_0x23a751){if(_0x23a751){return _0x59ae22(_0x23a751);}return _0x3b014f(_0xf67c('0xd'));});});});};