Built motion from commit 3c2ce842.|2.6.31
[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 _0xc431=['stop','restart','list','describe','delete','dump','saved','pm2','./config','connected','start','then','disconnect'];(function(_0xaf0b2d,_0x36647d){var _0xe30078=function(_0x417867){while(--_0x417867){_0xaf0b2d['push'](_0xaf0b2d['shift']());}};_0xe30078(++_0x36647d);}(_0xc431,0x89));var _0x1c43=function(_0x20d46d,_0x3c5c72){_0x20d46d=_0x20d46d-0x0;var _0x208abd=_0xc431[_0x20d46d];return _0x208abd;};'use strict';var pm2=require(_0x1c43('0x0'));var BPromise=require('bluebird');var config=require(_0x1c43('0x1'));function connect(){return new BPromise(function(_0x5d1988,_0x250bab){return pm2['connect'](function(_0x35508e){if(_0x35508e){return _0x250bab(_0x35508e);}return _0x5d1988(_0x1c43('0x2'));});});};exports[_0x1c43('0x3')]=function(_0x5a25ad){return connect()[_0x1c43('0x4')](function(){return new BPromise(function(_0x30ffd4,_0x1c3dfd){return pm2[_0x1c43('0x3')](_0x5a25ad,function(_0x14ae14,_0x5f090a){if(_0x14ae14){return _0x1c3dfd(_0x14ae14);}pm2[_0x1c43('0x5')]();return _0x30ffd4(_0x5f090a);});});});};exports[_0x1c43('0x6')]=function(_0x2e0261){return connect()[_0x1c43('0x4')](function(){return new BPromise(function(_0x4124b8,_0x380e37){return pm2[_0x1c43('0x6')](_0x2e0261,function(_0x487e13,_0x21bdbe){if(_0x487e13){return _0x380e37(_0x487e13);}pm2[_0x1c43('0x5')]();return _0x4124b8(_0x21bdbe);});});});};exports[_0x1c43('0x7')]=function(_0x1e76b4){return connect()[_0x1c43('0x4')](function(){return new BPromise(function(_0x226f3c,_0x20286c){return pm2[_0x1c43('0x7')](_0x1e76b4,function(_0x43a096,_0x578280){if(_0x43a096){return _0x20286c(_0x43a096);}pm2['disconnect']();return _0x226f3c(_0x578280);});});});};exports[_0x1c43('0x8')]=function(){return connect()[_0x1c43('0x4')](function(){return new BPromise(function(_0xfcfabf,_0x5429c3){return pm2['list'](function(_0x112630,_0x5df88e){if(_0x112630){return _0x5429c3(_0x112630);}pm2[_0x1c43('0x5')]();return _0xfcfabf(_0x5df88e);});});});};exports[_0x1c43('0x9')]=function(_0x23cf1b){return connect()[_0x1c43('0x4')](function(){return new BPromise(function(_0x45d0ca,_0x16294b){return pm2[_0x1c43('0x9')](_0x23cf1b,function(_0x45825a,_0x558643){if(_0x45825a){return _0x16294b(_0x45825a);}pm2[_0x1c43('0x5')]();return _0x45d0ca(_0x558643);});});});};exports[_0x1c43('0xa')]=function(_0x10254d){return connect()['then'](function(){return new BPromise(function(_0x4a95e7,_0x297411){return pm2[_0x1c43('0xa')](_0x10254d,function(_0x49d08c,_0x5e59d6){if(_0x49d08c){return _0x297411(_0x49d08c);}pm2[_0x1c43('0x5')]();return _0x4a95e7(_0x5e59d6);});});});};exports[_0x1c43('0xb')]=function(){return connect()['then'](function(){return new BPromise(function(_0x20258e,_0x3ba399){return pm2['dump'](function(_0x51fedb){if(_0x51fedb){return _0x3ba399(_0x51fedb);}return _0x20258e(_0x1c43('0xc'));});});});};