Built motion from commit (unavailable).|2.5.30
[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 _0xf611=['restart','list','describe','delete','dump','saved','bluebird','./config','connected','then','start','disconnect','stop'];(function(_0x1928c9,_0x13a6d1){var _0x51b5fb=function(_0x24cf70){while(--_0x24cf70){_0x1928c9['push'](_0x1928c9['shift']());}};_0x51b5fb(++_0x13a6d1);}(_0xf611,0x7b));var _0x1f61=function(_0x1da527,_0x2dc953){_0x1da527=_0x1da527-0x0;var _0x40fc7c=_0xf611[_0x1da527];return _0x40fc7c;};'use strict';var pm2=require('pm2');var BPromise=require(_0x1f61('0x0'));var config=require(_0x1f61('0x1'));function connect(){return new BPromise(function(_0x2db528,_0x58da3e){return pm2['connect'](function(_0x5ede64){if(_0x5ede64){return _0x58da3e(_0x5ede64);}return _0x2db528(_0x1f61('0x2'));});});};exports['start']=function(_0xdc8d91){return connect()[_0x1f61('0x3')](function(){return new BPromise(function(_0x57872c,_0x4faa5b){return pm2[_0x1f61('0x4')](_0xdc8d91,function(_0x34a924,_0x3a5e33){if(_0x34a924){return _0x4faa5b(_0x34a924);}pm2[_0x1f61('0x5')]();return _0x57872c(_0x3a5e33);});});});};exports['stop']=function(_0x2d3aeb){return connect()[_0x1f61('0x3')](function(){return new BPromise(function(_0x2dafd0,_0x47f426){return pm2[_0x1f61('0x6')](_0x2d3aeb,function(_0x1ce344,_0x548156){if(_0x1ce344){return _0x47f426(_0x1ce344);}pm2['disconnect']();return _0x2dafd0(_0x548156);});});});};exports[_0x1f61('0x7')]=function(_0x4d145e){return connect()[_0x1f61('0x3')](function(){return new BPromise(function(_0x2ee15e,_0x4329cf){return pm2[_0x1f61('0x7')](_0x4d145e,function(_0x48592e,_0x37cb71){if(_0x48592e){return _0x4329cf(_0x48592e);}pm2['disconnect']();return _0x2ee15e(_0x37cb71);});});});};exports[_0x1f61('0x8')]=function(){return connect()[_0x1f61('0x3')](function(){return new BPromise(function(_0x33d444,_0x185a00){return pm2[_0x1f61('0x8')](function(_0xe7ad5c,_0x206c0d){if(_0xe7ad5c){return _0x185a00(_0xe7ad5c);}pm2[_0x1f61('0x5')]();return _0x33d444(_0x206c0d);});});});};exports[_0x1f61('0x9')]=function(_0x22bb50){return connect()[_0x1f61('0x3')](function(){return new BPromise(function(_0x246530,_0x45df7f){return pm2[_0x1f61('0x9')](_0x22bb50,function(_0x3e6ef5,_0x3a3a5a){if(_0x3e6ef5){return _0x45df7f(_0x3e6ef5);}pm2[_0x1f61('0x5')]();return _0x246530(_0x3a3a5a);});});});};exports[_0x1f61('0xa')]=function(_0xf5e83a){return connect()[_0x1f61('0x3')](function(){return new BPromise(function(_0x40ff13,_0x5954e4){return pm2[_0x1f61('0xa')](_0xf5e83a,function(_0x4484e9,_0x5dc6af){if(_0x4484e9){return _0x5954e4(_0x4484e9);}pm2['disconnect']();return _0x40ff13(_0x5dc6af);});});});};exports[_0x1f61('0xb')]=function(){return connect()[_0x1f61('0x3')](function(){return new BPromise(function(_0x3e052,_0x42b543){return pm2[_0x1f61('0xb')](function(_0x3df30f){if(_0x3df30f){return _0x42b543(_0x3df30f);}return _0x3e052(_0x1f61('0xc'));});});});};