Built motion from commit 10af8726.|2.6.34
[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 _0x52c5=['dump','saved','./config','connect','start','then','disconnect','restart','list','describe','delete'];(function(_0x2064e5,_0x4f6fa2){var _0x21a233=function(_0x1b2491){while(--_0x1b2491){_0x2064e5['push'](_0x2064e5['shift']());}};_0x21a233(++_0x4f6fa2);}(_0x52c5,0xb2));var _0x552c=function(_0x225f50,_0x48a77d){_0x225f50=_0x225f50-0x0;var _0x19d003=_0x52c5[_0x225f50];return _0x19d003;};'use strict';var pm2=require('pm2');var BPromise=require('bluebird');var config=require(_0x552c('0x0'));function connect(){return new BPromise(function(_0x1c0d0c,_0x4baae9){return pm2[_0x552c('0x1')](function(_0xb393b){if(_0xb393b){return _0x4baae9(_0xb393b);}return _0x1c0d0c('connected');});});};exports[_0x552c('0x2')]=function(_0x1baa2c){return connect()[_0x552c('0x3')](function(){return new BPromise(function(_0x33d702,_0x56fab2){return pm2[_0x552c('0x2')](_0x1baa2c,function(_0x3711f1,_0x150b2a){if(_0x3711f1){return _0x56fab2(_0x3711f1);}pm2[_0x552c('0x4')]();return _0x33d702(_0x150b2a);});});});};exports['stop']=function(_0x21b695){return connect()[_0x552c('0x3')](function(){return new BPromise(function(_0x5c1274,_0x296a10){return pm2['stop'](_0x21b695,function(_0x447e25,_0xeec05f){if(_0x447e25){return _0x296a10(_0x447e25);}pm2[_0x552c('0x4')]();return _0x5c1274(_0xeec05f);});});});};exports[_0x552c('0x5')]=function(_0x38a804){return connect()[_0x552c('0x3')](function(){return new BPromise(function(_0x490338,_0x59135a){return pm2[_0x552c('0x5')](_0x38a804,function(_0x433969,_0x3dcfd4){if(_0x433969){return _0x59135a(_0x433969);}pm2[_0x552c('0x4')]();return _0x490338(_0x3dcfd4);});});});};exports[_0x552c('0x6')]=function(){return connect()['then'](function(){return new BPromise(function(_0x34c578,_0x5c57d6){return pm2[_0x552c('0x6')](function(_0xb22601,_0x142aed){if(_0xb22601){return _0x5c57d6(_0xb22601);}pm2['disconnect']();return _0x34c578(_0x142aed);});});});};exports[_0x552c('0x7')]=function(_0x16cbac){return connect()[_0x552c('0x3')](function(){return new BPromise(function(_0x1cee88,_0x46b9cf){return pm2[_0x552c('0x7')](_0x16cbac,function(_0x244c5e,_0x26df46){if(_0x244c5e){return _0x46b9cf(_0x244c5e);}pm2[_0x552c('0x4')]();return _0x1cee88(_0x26df46);});});});};exports[_0x552c('0x8')]=function(_0x214431){return connect()['then'](function(){return new BPromise(function(_0x112981,_0x22f289){return pm2['delete'](_0x214431,function(_0x37a2ec,_0x4f4a39){if(_0x37a2ec){return _0x22f289(_0x37a2ec);}pm2[_0x552c('0x4')]();return _0x112981(_0x4f4a39);});});});};exports[_0x552c('0x9')]=function(){return connect()['then'](function(){return new BPromise(function(_0x224afa,_0x3f9430){return pm2[_0x552c('0x9')](function(_0x55cbcc){if(_0x55cbcc){return _0x3f9430(_0x55cbcc);}return _0x224afa(_0x552c('0xa'));});});});};