Built motion from commit (unavailable).|2.5.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 _0x7edb=['disconnect','stop','restart','list','describe','delete','dump','saved','bluebird','./config','connect','connected','then','start'];(function(_0x5f309e,_0x66e31){var _0x487b5e=function(_0x44f203){while(--_0x44f203){_0x5f309e['push'](_0x5f309e['shift']());}};_0x487b5e(++_0x66e31);}(_0x7edb,0x158));var _0xb7ed=function(_0x22ae44,_0x30ffb5){_0x22ae44=_0x22ae44-0x0;var _0x2a2e96=_0x7edb[_0x22ae44];return _0x2a2e96;};'use strict';var pm2=require('pm2');var BPromise=require(_0xb7ed('0x0'));var config=require(_0xb7ed('0x1'));function connect(){return new BPromise(function(_0x1ed13e,_0x37440f){return pm2[_0xb7ed('0x2')](function(_0x5a485a){if(_0x5a485a){return _0x37440f(_0x5a485a);}return _0x1ed13e(_0xb7ed('0x3'));});});};exports['start']=function(_0x4c8316){return connect()[_0xb7ed('0x4')](function(){return new BPromise(function(_0x3ba4b9,_0x2aa67d){return pm2[_0xb7ed('0x5')](_0x4c8316,function(_0x85fdf0,_0x161542){if(_0x85fdf0){return _0x2aa67d(_0x85fdf0);}pm2[_0xb7ed('0x6')]();return _0x3ba4b9(_0x161542);});});});};exports[_0xb7ed('0x7')]=function(_0x3aee5b){return connect()[_0xb7ed('0x4')](function(){return new BPromise(function(_0x56c397,_0x209255){return pm2[_0xb7ed('0x7')](_0x3aee5b,function(_0x183666,_0x6c792e){if(_0x183666){return _0x209255(_0x183666);}pm2[_0xb7ed('0x6')]();return _0x56c397(_0x6c792e);});});});};exports[_0xb7ed('0x8')]=function(_0x313a74){return connect()['then'](function(){return new BPromise(function(_0x38a3f5,_0x45aaa3){return pm2[_0xb7ed('0x8')](_0x313a74,function(_0x43ebad,_0x52a37b){if(_0x43ebad){return _0x45aaa3(_0x43ebad);}pm2['disconnect']();return _0x38a3f5(_0x52a37b);});});});};exports['list']=function(){return connect()[_0xb7ed('0x4')](function(){return new BPromise(function(_0x582434,_0x3dc68){return pm2[_0xb7ed('0x9')](function(_0x1a61d0,_0x2febc7){if(_0x1a61d0){return _0x3dc68(_0x1a61d0);}pm2[_0xb7ed('0x6')]();return _0x582434(_0x2febc7);});});});};exports[_0xb7ed('0xa')]=function(_0x3e7c29){return connect()[_0xb7ed('0x4')](function(){return new BPromise(function(_0x4046c7,_0x2ea4cf){return pm2[_0xb7ed('0xa')](_0x3e7c29,function(_0x3e61b8,_0x569fb1){if(_0x3e61b8){return _0x2ea4cf(_0x3e61b8);}pm2[_0xb7ed('0x6')]();return _0x4046c7(_0x569fb1);});});});};exports['delete']=function(_0x3b5a2b){return connect()[_0xb7ed('0x4')](function(){return new BPromise(function(_0x537d3b,_0x4f1bb3){return pm2[_0xb7ed('0xb')](_0x3b5a2b,function(_0x12ff48,_0x6b0bf5){if(_0x12ff48){return _0x4f1bb3(_0x12ff48);}pm2['disconnect']();return _0x537d3b(_0x6b0bf5);});});});};exports[_0xb7ed('0xc')]=function(){return connect()[_0xb7ed('0x4')](function(){return new BPromise(function(_0xa5c636,_0x6b7e96){return pm2['dump'](function(_0x10d622){if(_0x10d622){return _0x6b7e96(_0x10d622);}return _0xa5c636(_0xb7ed('0xd'));});});});};