Built motion from commit da617fac.|2.6.6
[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 _0xb7ab=['stop','disconnect','restart','describe','delete','dump','saved','pm2','./config','connect','connected','start','then'];(function(_0x254dc3,_0x59264f){var _0x2b8403=function(_0x2fb435){while(--_0x2fb435){_0x254dc3['push'](_0x254dc3['shift']());}};_0x2b8403(++_0x59264f);}(_0xb7ab,0xca));var _0xbb7a=function(_0x2641f9,_0x26715f){_0x2641f9=_0x2641f9-0x0;var _0x585741=_0xb7ab[_0x2641f9];return _0x585741;};'use strict';var pm2=require(_0xbb7a('0x0'));var BPromise=require('bluebird');var config=require(_0xbb7a('0x1'));function connect(){return new BPromise(function(_0x7844c9,_0x3cf7cc){return pm2[_0xbb7a('0x2')](function(_0x55f193){if(_0x55f193){return _0x3cf7cc(_0x55f193);}return _0x7844c9(_0xbb7a('0x3'));});});};exports[_0xbb7a('0x4')]=function(_0xd9bee2){return connect()[_0xbb7a('0x5')](function(){return new BPromise(function(_0x57e6ce,_0x977613){return pm2[_0xbb7a('0x4')](_0xd9bee2,function(_0x5ab2d9,_0x52af53){if(_0x5ab2d9){return _0x977613(_0x5ab2d9);}pm2['disconnect']();return _0x57e6ce(_0x52af53);});});});};exports[_0xbb7a('0x6')]=function(_0xc49ecb){return connect()[_0xbb7a('0x5')](function(){return new BPromise(function(_0x2d44ce,_0x1c1d89){return pm2[_0xbb7a('0x6')](_0xc49ecb,function(_0x4f0512,_0x55a63a){if(_0x4f0512){return _0x1c1d89(_0x4f0512);}pm2[_0xbb7a('0x7')]();return _0x2d44ce(_0x55a63a);});});});};exports[_0xbb7a('0x8')]=function(_0x3431fe){return connect()['then'](function(){return new BPromise(function(_0x25762c,_0x2780c5){return pm2[_0xbb7a('0x8')](_0x3431fe,function(_0x5706cc,_0x466b13){if(_0x5706cc){return _0x2780c5(_0x5706cc);}pm2['disconnect']();return _0x25762c(_0x466b13);});});});};exports['list']=function(){return connect()[_0xbb7a('0x5')](function(){return new BPromise(function(_0x5197e6,_0x3578ce){return pm2['list'](function(_0x1a06a2,_0xabc3fc){if(_0x1a06a2){return _0x3578ce(_0x1a06a2);}pm2['disconnect']();return _0x5197e6(_0xabc3fc);});});});};exports['describe']=function(_0x3462f0){return connect()[_0xbb7a('0x5')](function(){return new BPromise(function(_0x18805a,_0x34e40b){return pm2[_0xbb7a('0x9')](_0x3462f0,function(_0x29edbc,_0x48a55d){if(_0x29edbc){return _0x34e40b(_0x29edbc);}pm2['disconnect']();return _0x18805a(_0x48a55d);});});});};exports[_0xbb7a('0xa')]=function(_0x566534){return connect()[_0xbb7a('0x5')](function(){return new BPromise(function(_0xb720a8,_0x4d484e){return pm2[_0xbb7a('0xa')](_0x566534,function(_0x948d63,_0x42dfc0){if(_0x948d63){return _0x4d484e(_0x948d63);}pm2['disconnect']();return _0xb720a8(_0x42dfc0);});});});};exports[_0xbb7a('0xb')]=function(){return connect()[_0xbb7a('0x5')](function(){return new BPromise(function(_0xf7fe5d,_0x3c953d){return pm2[_0xbb7a('0xb')](function(_0x14f1db){if(_0x14f1db){return _0x3c953d(_0x14f1db);}return _0xf7fe5d(_0xbb7a('0xc'));});});});};