Built motion from commit (unavailable).|2.5.14
[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 _0xdc68=['saved','pm2','bluebird','./config','connect','start','then','disconnect','stop','restart','list','describe','delete','dump'];(function(_0xdb29a5,_0x24f948){var _0x237689=function(_0x5d9c6e){while(--_0x5d9c6e){_0xdb29a5['push'](_0xdb29a5['shift']());}};_0x237689(++_0x24f948);}(_0xdc68,0x16d));var _0x8dc6=function(_0x66ce7d,_0x2ee406){_0x66ce7d=_0x66ce7d-0x0;var _0x9591d6=_0xdc68[_0x66ce7d];return _0x9591d6;};'use strict';var pm2=require(_0x8dc6('0x0'));var BPromise=require(_0x8dc6('0x1'));var config=require(_0x8dc6('0x2'));function connect(){return new BPromise(function(_0x5c3a9c,_0x10682e){return pm2[_0x8dc6('0x3')](function(_0x33c2b8){if(_0x33c2b8){return _0x10682e(_0x33c2b8);}return _0x5c3a9c('connected');});});};exports[_0x8dc6('0x4')]=function(_0x1f218a){return connect()[_0x8dc6('0x5')](function(){return new BPromise(function(_0x54ec52,_0xd4f620){return pm2['start'](_0x1f218a,function(_0x4ba80b,_0x1e9df2){if(_0x4ba80b){return _0xd4f620(_0x4ba80b);}pm2[_0x8dc6('0x6')]();return _0x54ec52(_0x1e9df2);});});});};exports[_0x8dc6('0x7')]=function(_0x4a3b62){return connect()[_0x8dc6('0x5')](function(){return new BPromise(function(_0x47b1de,_0x3cd256){return pm2[_0x8dc6('0x7')](_0x4a3b62,function(_0x1cc4f5,_0x11ed99){if(_0x1cc4f5){return _0x3cd256(_0x1cc4f5);}pm2[_0x8dc6('0x6')]();return _0x47b1de(_0x11ed99);});});});};exports[_0x8dc6('0x8')]=function(_0x3a03b3){return connect()['then'](function(){return new BPromise(function(_0x194195,_0x44ca66){return pm2[_0x8dc6('0x8')](_0x3a03b3,function(_0x202b0f,_0x3f7b72){if(_0x202b0f){return _0x44ca66(_0x202b0f);}pm2[_0x8dc6('0x6')]();return _0x194195(_0x3f7b72);});});});};exports[_0x8dc6('0x9')]=function(){return connect()[_0x8dc6('0x5')](function(){return new BPromise(function(_0x480af1,_0x4a8e5f){return pm2['list'](function(_0x557785,_0x5c4c32){if(_0x557785){return _0x4a8e5f(_0x557785);}pm2[_0x8dc6('0x6')]();return _0x480af1(_0x5c4c32);});});});};exports['describe']=function(_0x5d5fc3){return connect()[_0x8dc6('0x5')](function(){return new BPromise(function(_0x16bad6,_0x2664af){return pm2[_0x8dc6('0xa')](_0x5d5fc3,function(_0x5022d8,_0x3a0c10){if(_0x5022d8){return _0x2664af(_0x5022d8);}pm2['disconnect']();return _0x16bad6(_0x3a0c10);});});});};exports[_0x8dc6('0xb')]=function(_0x3f87c3){return connect()[_0x8dc6('0x5')](function(){return new BPromise(function(_0x59d685,_0x30f26b){return pm2[_0x8dc6('0xb')](_0x3f87c3,function(_0x2c9e35,_0x4cdf21){if(_0x2c9e35){return _0x30f26b(_0x2c9e35);}pm2[_0x8dc6('0x6')]();return _0x59d685(_0x4cdf21);});});});};exports[_0x8dc6('0xc')]=function(){return connect()[_0x8dc6('0x5')](function(){return new BPromise(function(_0x38d16d,_0x175208){return pm2[_0x8dc6('0xc')](function(_0x513790){if(_0x513790){return _0x175208(_0x513790);}return _0x38d16d(_0x8dc6('0xd'));});});});};