Built motion from commit (unavailable).|2.5.4
[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 _0x847f=['disconnect','stop','restart','then','list','describe','delete','dump','pm2','bluebird','./config','connect','connected','start'];(function(_0x42b782,_0xee8501){var _0x57ddd7=function(_0x1baed6){while(--_0x1baed6){_0x42b782['push'](_0x42b782['shift']());}};_0x57ddd7(++_0xee8501);}(_0x847f,0x182));var _0xf847=function(_0x426b63,_0x3b4c07){_0x426b63=_0x426b63-0x0;var _0x1adcc0=_0x847f[_0x426b63];return _0x1adcc0;};'use strict';var pm2=require(_0xf847('0x0'));var BPromise=require(_0xf847('0x1'));var config=require(_0xf847('0x2'));function connect(){return new BPromise(function(_0x4a346f,_0x19a000){return pm2[_0xf847('0x3')](function(_0x1496e8){if(_0x1496e8){return _0x19a000(_0x1496e8);}return _0x4a346f(_0xf847('0x4'));});});};exports[_0xf847('0x5')]=function(_0x5d5964){return connect()['then'](function(){return new BPromise(function(_0x10470f,_0x1cf273){return pm2['start'](_0x5d5964,function(_0x5e7c87,_0x491c65){if(_0x5e7c87){return _0x1cf273(_0x5e7c87);}pm2[_0xf847('0x6')]();return _0x10470f(_0x491c65);});});});};exports[_0xf847('0x7')]=function(_0x18d9a7){return connect()['then'](function(){return new BPromise(function(_0x456ad8,_0x1e5a6e){return pm2[_0xf847('0x7')](_0x18d9a7,function(_0x49bb44,_0x26acc8){if(_0x49bb44){return _0x1e5a6e(_0x49bb44);}pm2['disconnect']();return _0x456ad8(_0x26acc8);});});});};exports[_0xf847('0x8')]=function(_0x2a9424){return connect()[_0xf847('0x9')](function(){return new BPromise(function(_0x47c130,_0x1fc016){return pm2['restart'](_0x2a9424,function(_0x17c044,_0x3a29bb){if(_0x17c044){return _0x1fc016(_0x17c044);}pm2[_0xf847('0x6')]();return _0x47c130(_0x3a29bb);});});});};exports[_0xf847('0xa')]=function(){return connect()[_0xf847('0x9')](function(){return new BPromise(function(_0x10e2d1,_0x34bdfc){return pm2[_0xf847('0xa')](function(_0x2c2a7b,_0x2b2c1e){if(_0x2c2a7b){return _0x34bdfc(_0x2c2a7b);}pm2[_0xf847('0x6')]();return _0x10e2d1(_0x2b2c1e);});});});};exports[_0xf847('0xb')]=function(_0x6428e){return connect()['then'](function(){return new BPromise(function(_0x1399e8,_0x10abe3){return pm2[_0xf847('0xb')](_0x6428e,function(_0x4bd4f2,_0x4e8201){if(_0x4bd4f2){return _0x10abe3(_0x4bd4f2);}pm2[_0xf847('0x6')]();return _0x1399e8(_0x4e8201);});});});};exports[_0xf847('0xc')]=function(_0x495012){return connect()[_0xf847('0x9')](function(){return new BPromise(function(_0xa7f88d,_0x34f349){return pm2[_0xf847('0xc')](_0x495012,function(_0x4299a4,_0x240ab0){if(_0x4299a4){return _0x34f349(_0x4299a4);}pm2['disconnect']();return _0xa7f88d(_0x240ab0);});});});};exports['dump']=function(){return connect()[_0xf847('0x9')](function(){return new BPromise(function(_0x25adfc,_0x54f2cb){return pm2[_0xf847('0xd')](function(_0x59e4bf){if(_0x59e4bf){return _0x54f2cb(_0x59e4bf);}return _0x25adfc('saved');});});});};