Built motion from commit f57cc866.|2.6.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 _0xfc03=['saved','pm2','bluebird','./config','connected','start','then','stop','restart','disconnect','list','describe','delete','dump'];(function(_0x67c931,_0x19ce0d){var _0x16063e=function(_0x1247da){while(--_0x1247da){_0x67c931['push'](_0x67c931['shift']());}};_0x16063e(++_0x19ce0d);}(_0xfc03,0xc5));var _0x3fc0=function(_0x82129b,_0x484ae9){_0x82129b=_0x82129b-0x0;var _0x2ae5dc=_0xfc03[_0x82129b];return _0x2ae5dc;};'use strict';var pm2=require(_0x3fc0('0x0'));var BPromise=require(_0x3fc0('0x1'));var config=require(_0x3fc0('0x2'));function connect(){return new BPromise(function(_0x57186e,_0x5aeab7){return pm2['connect'](function(_0x31dd80){if(_0x31dd80){return _0x5aeab7(_0x31dd80);}return _0x57186e(_0x3fc0('0x3'));});});};exports[_0x3fc0('0x4')]=function(_0xedc06c){return connect()[_0x3fc0('0x5')](function(){return new BPromise(function(_0x8dfbbf,_0x204155){return pm2[_0x3fc0('0x4')](_0xedc06c,function(_0x1e8867,_0xb8d52){if(_0x1e8867){return _0x204155(_0x1e8867);}pm2['disconnect']();return _0x8dfbbf(_0xb8d52);});});});};exports[_0x3fc0('0x6')]=function(_0x5e8751){return connect()[_0x3fc0('0x5')](function(){return new BPromise(function(_0x308b1a,_0x289b52){return pm2['stop'](_0x5e8751,function(_0x659381,_0x46f011){if(_0x659381){return _0x289b52(_0x659381);}pm2['disconnect']();return _0x308b1a(_0x46f011);});});});};exports['restart']=function(_0x102eba){return connect()[_0x3fc0('0x5')](function(){return new BPromise(function(_0x3cdf44,_0x43ac48){return pm2[_0x3fc0('0x7')](_0x102eba,function(_0x472fe4,_0x1d5433){if(_0x472fe4){return _0x43ac48(_0x472fe4);}pm2[_0x3fc0('0x8')]();return _0x3cdf44(_0x1d5433);});});});};exports[_0x3fc0('0x9')]=function(){return connect()[_0x3fc0('0x5')](function(){return new BPromise(function(_0x2385e2,_0x73d98f){return pm2[_0x3fc0('0x9')](function(_0x548251,_0x1de939){if(_0x548251){return _0x73d98f(_0x548251);}pm2[_0x3fc0('0x8')]();return _0x2385e2(_0x1de939);});});});};exports[_0x3fc0('0xa')]=function(_0x3c4178){return connect()[_0x3fc0('0x5')](function(){return new BPromise(function(_0x389a0a,_0x4eff0f){return pm2[_0x3fc0('0xa')](_0x3c4178,function(_0x5024be,_0x5635f9){if(_0x5024be){return _0x4eff0f(_0x5024be);}pm2[_0x3fc0('0x8')]();return _0x389a0a(_0x5635f9);});});});};exports['delete']=function(_0x2604f1){return connect()[_0x3fc0('0x5')](function(){return new BPromise(function(_0x165860,_0x1c9425){return pm2[_0x3fc0('0xb')](_0x2604f1,function(_0x3c86d9,_0x177637){if(_0x3c86d9){return _0x1c9425(_0x3c86d9);}pm2['disconnect']();return _0x165860(_0x177637);});});});};exports[_0x3fc0('0xc')]=function(){return connect()[_0x3fc0('0x5')](function(){return new BPromise(function(_0x2178b1,_0x3f10b7){return pm2[_0x3fc0('0xc')](function(_0x1ad78c){if(_0x1ad78c){return _0x3f10b7(_0x1ad78c);}return _0x2178b1(_0x3fc0('0xd'));});});});};