5275cd7beeaaf57311a1d5995c05aacec57fb2d7
[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 _0x4e39=['then','restart','list','describe','delete','dump','pm2','bluebird','./config','connected','start','disconnect','stop'];(function(_0xb0de07,_0x3ca2a0){var _0x4633d8=function(_0x2368e0){while(--_0x2368e0){_0xb0de07['push'](_0xb0de07['shift']());}};_0x4633d8(++_0x3ca2a0);}(_0x4e39,0xfd));var _0x94e3=function(_0x4bb94b,_0x50628a){_0x4bb94b=_0x4bb94b-0x0;var _0x36dcc6=_0x4e39[_0x4bb94b];return _0x36dcc6;};'use strict';var pm2=require(_0x94e3('0x0'));var BPromise=require(_0x94e3('0x1'));var config=require(_0x94e3('0x2'));function connect(){return new BPromise(function(_0x4a61c9,_0x283546){return pm2['connect'](function(_0x26a113){if(_0x26a113){return _0x283546(_0x26a113);}return _0x4a61c9(_0x94e3('0x3'));});});};exports[_0x94e3('0x4')]=function(_0x5174f7){return connect()['then'](function(){return new BPromise(function(_0x3f6970,_0x481e18){return pm2['start'](_0x5174f7,function(_0x1b607a,_0x1a0dd1){if(_0x1b607a){return _0x481e18(_0x1b607a);}pm2[_0x94e3('0x5')]();return _0x3f6970(_0x1a0dd1);});});});};exports[_0x94e3('0x6')]=function(_0x4ddf2f){return connect()[_0x94e3('0x7')](function(){return new BPromise(function(_0x30aa3f,_0x5bdfb6){return pm2[_0x94e3('0x6')](_0x4ddf2f,function(_0x425565,_0xa284f0){if(_0x425565){return _0x5bdfb6(_0x425565);}pm2[_0x94e3('0x5')]();return _0x30aa3f(_0xa284f0);});});});};exports[_0x94e3('0x8')]=function(_0x357f62){return connect()['then'](function(){return new BPromise(function(_0x4bcb64,_0x4ab42e){return pm2[_0x94e3('0x8')](_0x357f62,function(_0x212171,_0x241f36){if(_0x212171){return _0x4ab42e(_0x212171);}pm2[_0x94e3('0x5')]();return _0x4bcb64(_0x241f36);});});});};exports[_0x94e3('0x9')]=function(){return connect()['then'](function(){return new BPromise(function(_0x5e622e,_0x5d5a56){return pm2['list'](function(_0x2e9fbb,_0x45e2d8){if(_0x2e9fbb){return _0x5d5a56(_0x2e9fbb);}pm2[_0x94e3('0x5')]();return _0x5e622e(_0x45e2d8);});});});};exports[_0x94e3('0xa')]=function(_0x3e8f8e){return connect()[_0x94e3('0x7')](function(){return new BPromise(function(_0x1d66f3,_0x1ade4b){return pm2[_0x94e3('0xa')](_0x3e8f8e,function(_0x46e9e6,_0x1d0f5a){if(_0x46e9e6){return _0x1ade4b(_0x46e9e6);}pm2[_0x94e3('0x5')]();return _0x1d66f3(_0x1d0f5a);});});});};exports[_0x94e3('0xb')]=function(_0x580064){return connect()[_0x94e3('0x7')](function(){return new BPromise(function(_0x50815c,_0x46a3c0){return pm2[_0x94e3('0xb')](_0x580064,function(_0x5afee4,_0x896f57){if(_0x5afee4){return _0x46a3c0(_0x5afee4);}pm2[_0x94e3('0x5')]();return _0x50815c(_0x896f57);});});});};exports['dump']=function(){return connect()['then'](function(){return new BPromise(function(_0x58dd71,_0x5a6639){return pm2[_0x94e3('0xc')](function(_0x3a60fa){if(_0x3a60fa){return _0x5a6639(_0x3a60fa);}return _0x58dd71('saved');});});});};