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 _0x9c5a=['stop','then','restart','disconnect','list','describe','delete','dump','saved','pm2','bluebird','connect','start'];(function(_0x25e7cb,_0x3579b7){var _0x375d92=function(_0xe8cf3b){while(--_0xe8cf3b){_0x25e7cb['push'](_0x25e7cb['shift']());}};_0x375d92(++_0x3579b7);}(_0x9c5a,0x1c3));var _0xa9c5=function(_0x4255f8,_0x38234a){_0x4255f8=_0x4255f8-0x0;var _0x9f3324=_0x9c5a[_0x4255f8];return _0x9f3324;};'use strict';var pm2=require(_0xa9c5('0x0'));var BPromise=require(_0xa9c5('0x1'));var config=require('./config');function connect(){return new BPromise(function(_0x32ab4d,_0x1cd14d){return pm2[_0xa9c5('0x2')](function(_0x32e75a){if(_0x32e75a){return _0x1cd14d(_0x32e75a);}return _0x32ab4d('connected');});});};exports[_0xa9c5('0x3')]=function(_0x3051b1){return connect()['then'](function(){return new BPromise(function(_0x1e3c83,_0x4d9c7a){return pm2[_0xa9c5('0x3')](_0x3051b1,function(_0x3df556,_0x4cb597){if(_0x3df556){return _0x4d9c7a(_0x3df556);}pm2['disconnect']();return _0x1e3c83(_0x4cb597);});});});};exports[_0xa9c5('0x4')]=function(_0x16f331){return connect()['then'](function(){return new BPromise(function(_0x2e2b3e,_0x97f9e2){return pm2['stop'](_0x16f331,function(_0x2e4f45,_0x40a79d){if(_0x2e4f45){return _0x97f9e2(_0x2e4f45);}pm2['disconnect']();return _0x2e2b3e(_0x40a79d);});});});};exports['restart']=function(_0x38e106){return connect()[_0xa9c5('0x5')](function(){return new BPromise(function(_0x45f8d8,_0x4b72b0){return pm2[_0xa9c5('0x6')](_0x38e106,function(_0x4492a4,_0x51c8d){if(_0x4492a4){return _0x4b72b0(_0x4492a4);}pm2[_0xa9c5('0x7')]();return _0x45f8d8(_0x51c8d);});});});};exports[_0xa9c5('0x8')]=function(){return connect()[_0xa9c5('0x5')](function(){return new BPromise(function(_0x5915ad,_0x390ca2){return pm2[_0xa9c5('0x8')](function(_0x7df76d,_0x3806c4){if(_0x7df76d){return _0x390ca2(_0x7df76d);}pm2[_0xa9c5('0x7')]();return _0x5915ad(_0x3806c4);});});});};exports[_0xa9c5('0x9')]=function(_0x251099){return connect()[_0xa9c5('0x5')](function(){return new BPromise(function(_0x19a43e,_0xcf13f2){return pm2['describe'](_0x251099,function(_0x2b0d73,_0xd85c32){if(_0x2b0d73){return _0xcf13f2(_0x2b0d73);}pm2[_0xa9c5('0x7')]();return _0x19a43e(_0xd85c32);});});});};exports['delete']=function(_0x2cda1b){return connect()[_0xa9c5('0x5')](function(){return new BPromise(function(_0x2b9ac5,_0x3b8cf7){return pm2[_0xa9c5('0xa')](_0x2cda1b,function(_0x349f27,_0x3b8d4d){if(_0x349f27){return _0x3b8cf7(_0x349f27);}pm2[_0xa9c5('0x7')]();return _0x2b9ac5(_0x3b8d4d);});});});};exports[_0xa9c5('0xb')]=function(){return connect()[_0xa9c5('0x5')](function(){return new BPromise(function(_0x113c8f,_0x2d95f8){return pm2['dump'](function(_0x1115ad){if(_0x1115ad){return _0x2d95f8(_0x1115ad);}return _0x113c8f(_0xa9c5('0xc'));});});});};