b8924b02399dcdef5c55a3160d09376d2ba66d34
[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 _0xf01c=['saved','pm2','bluebird','connect','connected','start','then','stop','disconnect','restart','list','describe','dump'];(function(_0x4431ee,_0x9beef4){var _0x43cbbc=function(_0xa49b69){while(--_0xa49b69){_0x4431ee['push'](_0x4431ee['shift']());}};_0x43cbbc(++_0x9beef4);}(_0xf01c,0x187));var _0xcf01=function(_0x2d8e0e,_0x40cd18){_0x2d8e0e=_0x2d8e0e-0x0;var _0x3ff08f=_0xf01c[_0x2d8e0e];return _0x3ff08f;};'use strict';var pm2=require(_0xcf01('0x0'));var BPromise=require(_0xcf01('0x1'));var config=require('./config');function connect(){return new BPromise(function(_0x352be8,_0x2c1bdf){return pm2[_0xcf01('0x2')](function(_0x49ab5d){if(_0x49ab5d){return _0x2c1bdf(_0x49ab5d);}return _0x352be8(_0xcf01('0x3'));});});};exports[_0xcf01('0x4')]=function(_0x329ea4){return connect()[_0xcf01('0x5')](function(){return new BPromise(function(_0x2f1972,_0x46a481){return pm2[_0xcf01('0x4')](_0x329ea4,function(_0x131b9b,_0x3427d0){if(_0x131b9b){return _0x46a481(_0x131b9b);}pm2['disconnect']();return _0x2f1972(_0x3427d0);});});});};exports[_0xcf01('0x6')]=function(_0x43547d){return connect()[_0xcf01('0x5')](function(){return new BPromise(function(_0x48e85b,_0x4749f0){return pm2[_0xcf01('0x6')](_0x43547d,function(_0x24b1dc,_0x4ac55f){if(_0x24b1dc){return _0x4749f0(_0x24b1dc);}pm2[_0xcf01('0x7')]();return _0x48e85b(_0x4ac55f);});});});};exports['restart']=function(_0x4f95c3){return connect()[_0xcf01('0x5')](function(){return new BPromise(function(_0x11330e,_0x3c2f53){return pm2[_0xcf01('0x8')](_0x4f95c3,function(_0x5c39e9,_0x540562){if(_0x5c39e9){return _0x3c2f53(_0x5c39e9);}pm2[_0xcf01('0x7')]();return _0x11330e(_0x540562);});});});};exports['list']=function(){return connect()['then'](function(){return new BPromise(function(_0x32a907,_0x523f05){return pm2[_0xcf01('0x9')](function(_0x9a7322,_0x2c58fc){if(_0x9a7322){return _0x523f05(_0x9a7322);}pm2['disconnect']();return _0x32a907(_0x2c58fc);});});});};exports[_0xcf01('0xa')]=function(_0x32da28){return connect()['then'](function(){return new BPromise(function(_0x17b101,_0x5e223f){return pm2[_0xcf01('0xa')](_0x32da28,function(_0x39461f,_0x497076){if(_0x39461f){return _0x5e223f(_0x39461f);}pm2[_0xcf01('0x7')]();return _0x17b101(_0x497076);});});});};exports['delete']=function(_0x315201){return connect()[_0xcf01('0x5')](function(){return new BPromise(function(_0x50d008,_0x4ca1e3){return pm2['delete'](_0x315201,function(_0x1ebec9,_0xde943c){if(_0x1ebec9){return _0x4ca1e3(_0x1ebec9);}pm2[_0xcf01('0x7')]();return _0x50d008(_0xde943c);});});});};exports['dump']=function(){return connect()['then'](function(){return new BPromise(function(_0x33e7c9,_0x12f755){return pm2[_0xcf01('0xb')](function(_0x30aa22){if(_0x30aa22){return _0x12f755(_0x30aa22);}return _0x33e7c9(_0xcf01('0xc'));});});});};