Built motion from commit f7863d46.|2.5.41
[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 _0xb8b5=['then','describe','delete','saved','pm2','./config','connect','connected','start','disconnect','stop','restart'];(function(_0x18cdfc,_0x2d794a){var _0x16a08b=function(_0x4634e7){while(--_0x4634e7){_0x18cdfc['push'](_0x18cdfc['shift']());}};_0x16a08b(++_0x2d794a);}(_0xb8b5,0x184));var _0x5b8b=function(_0x30bad1,_0x308947){_0x30bad1=_0x30bad1-0x0;var _0x507190=_0xb8b5[_0x30bad1];return _0x507190;};'use strict';var pm2=require(_0x5b8b('0x0'));var BPromise=require('bluebird');var config=require(_0x5b8b('0x1'));function connect(){return new BPromise(function(_0x4139f8,_0x1a9ef3){return pm2[_0x5b8b('0x2')](function(_0x2d1598){if(_0x2d1598){return _0x1a9ef3(_0x2d1598);}return _0x4139f8(_0x5b8b('0x3'));});});};exports[_0x5b8b('0x4')]=function(_0x3498ea){return connect()['then'](function(){return new BPromise(function(_0x4827a2,_0x1733d7){return pm2[_0x5b8b('0x4')](_0x3498ea,function(_0x1840b7,_0x1c45f4){if(_0x1840b7){return _0x1733d7(_0x1840b7);}pm2[_0x5b8b('0x5')]();return _0x4827a2(_0x1c45f4);});});});};exports['stop']=function(_0x5974ed){return connect()['then'](function(){return new BPromise(function(_0x51a10b,_0x5829f9){return pm2[_0x5b8b('0x6')](_0x5974ed,function(_0x42f3d1,_0x1e1b1d){if(_0x42f3d1){return _0x5829f9(_0x42f3d1);}pm2[_0x5b8b('0x5')]();return _0x51a10b(_0x1e1b1d);});});});};exports['restart']=function(_0x10a38e){return connect()['then'](function(){return new BPromise(function(_0x363237,_0x2c194c){return pm2[_0x5b8b('0x7')](_0x10a38e,function(_0x68eea7,_0xa5a79f){if(_0x68eea7){return _0x2c194c(_0x68eea7);}pm2[_0x5b8b('0x5')]();return _0x363237(_0xa5a79f);});});});};exports['list']=function(){return connect()[_0x5b8b('0x8')](function(){return new BPromise(function(_0x46f3e6,_0x54c0eb){return pm2['list'](function(_0x14d259,_0x1109b9){if(_0x14d259){return _0x54c0eb(_0x14d259);}pm2[_0x5b8b('0x5')]();return _0x46f3e6(_0x1109b9);});});});};exports['describe']=function(_0xf0f261){return connect()['then'](function(){return new BPromise(function(_0x30ea60,_0x48daf6){return pm2[_0x5b8b('0x9')](_0xf0f261,function(_0x5a9602,_0x42f269){if(_0x5a9602){return _0x48daf6(_0x5a9602);}pm2[_0x5b8b('0x5')]();return _0x30ea60(_0x42f269);});});});};exports[_0x5b8b('0xa')]=function(_0x1aad2d){return connect()[_0x5b8b('0x8')](function(){return new BPromise(function(_0x14ec59,_0x2e1615){return pm2[_0x5b8b('0xa')](_0x1aad2d,function(_0x476b2c,_0x94ee83){if(_0x476b2c){return _0x2e1615(_0x476b2c);}pm2[_0x5b8b('0x5')]();return _0x14ec59(_0x94ee83);});});});};exports['dump']=function(){return connect()[_0x5b8b('0x8')](function(){return new BPromise(function(_0x1e9f1b,_0x183a00){return pm2['dump'](function(_0x136af6){if(_0x136af6){return _0x183a00(_0x136af6);}return _0x1e9f1b(_0x5b8b('0xb'));});});});};