Built motion from commit d1eab355.|2.6.28
[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 _0xc041=['connect','start','disconnect','stop','then','restart','list','describe','delete','dump','saved','pm2','bluebird','./config'];(function(_0x40a045,_0x516f0e){var _0x1a687c=function(_0x48c9fe){while(--_0x48c9fe){_0x40a045['push'](_0x40a045['shift']());}};_0x1a687c(++_0x516f0e);}(_0xc041,0xc1));var _0x1c04=function(_0x503699,_0x152145){_0x503699=_0x503699-0x0;var _0xd66c82=_0xc041[_0x503699];return _0xd66c82;};'use strict';var pm2=require(_0x1c04('0x0'));var BPromise=require(_0x1c04('0x1'));var config=require(_0x1c04('0x2'));function connect(){return new BPromise(function(_0x3555ed,_0x4f2738){return pm2[_0x1c04('0x3')](function(_0x246df2){if(_0x246df2){return _0x4f2738(_0x246df2);}return _0x3555ed('connected');});});};exports[_0x1c04('0x4')]=function(_0x1f44a0){return connect()['then'](function(){return new BPromise(function(_0x3e9cda,_0x56267f){return pm2[_0x1c04('0x4')](_0x1f44a0,function(_0x5f2e20,_0x561fb0){if(_0x5f2e20){return _0x56267f(_0x5f2e20);}pm2[_0x1c04('0x5')]();return _0x3e9cda(_0x561fb0);});});});};exports[_0x1c04('0x6')]=function(_0x3847c6){return connect()[_0x1c04('0x7')](function(){return new BPromise(function(_0xded9c8,_0x212128){return pm2[_0x1c04('0x6')](_0x3847c6,function(_0x528de8,_0x1da379){if(_0x528de8){return _0x212128(_0x528de8);}pm2[_0x1c04('0x5')]();return _0xded9c8(_0x1da379);});});});};exports['restart']=function(_0x3f9c35){return connect()['then'](function(){return new BPromise(function(_0x2eba3b,_0xc544ce){return pm2[_0x1c04('0x8')](_0x3f9c35,function(_0x14b8db,_0x49302e){if(_0x14b8db){return _0xc544ce(_0x14b8db);}pm2['disconnect']();return _0x2eba3b(_0x49302e);});});});};exports[_0x1c04('0x9')]=function(){return connect()[_0x1c04('0x7')](function(){return new BPromise(function(_0x53b67b,_0x58855e){return pm2[_0x1c04('0x9')](function(_0x2bbd6c,_0x5d129b){if(_0x2bbd6c){return _0x58855e(_0x2bbd6c);}pm2[_0x1c04('0x5')]();return _0x53b67b(_0x5d129b);});});});};exports['describe']=function(_0x15a70f){return connect()[_0x1c04('0x7')](function(){return new BPromise(function(_0x4d8598,_0x584e34){return pm2[_0x1c04('0xa')](_0x15a70f,function(_0x524d16,_0x33598d){if(_0x524d16){return _0x584e34(_0x524d16);}pm2[_0x1c04('0x5')]();return _0x4d8598(_0x33598d);});});});};exports[_0x1c04('0xb')]=function(_0x1aefdb){return connect()[_0x1c04('0x7')](function(){return new BPromise(function(_0x3bd7a3,_0x595e6c){return pm2['delete'](_0x1aefdb,function(_0xf1cbb2,_0x2a5d14){if(_0xf1cbb2){return _0x595e6c(_0xf1cbb2);}pm2[_0x1c04('0x5')]();return _0x3bd7a3(_0x2a5d14);});});});};exports[_0x1c04('0xc')]=function(){return connect()['then'](function(){return new BPromise(function(_0x37cac8,_0x1f369d){return pm2[_0x1c04('0xc')](function(_0x21b7e3){if(_0x21b7e3){return _0x1f369d(_0x21b7e3);}return _0x37cac8(_0x1c04('0xd'));});});});};