Built motion from commit 3a7e82ea.|2.6.29
[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 _0x917c=['saved','./config','connected','then','start','disconnect','stop','restart','list','describe','dump'];(function(_0x159eab,_0x22d972){var _0x47e933=function(_0x58e802){while(--_0x58e802){_0x159eab['push'](_0x159eab['shift']());}};_0x47e933(++_0x22d972);}(_0x917c,0x1ae));var _0xc917=function(_0x5586a7,_0x276a61){_0x5586a7=_0x5586a7-0x0;var _0x379a38=_0x917c[_0x5586a7];return _0x379a38;};'use strict';var pm2=require('pm2');var BPromise=require('bluebird');var config=require(_0xc917('0x0'));function connect(){return new BPromise(function(_0x2b51d9,_0x1e7909){return pm2['connect'](function(_0x46e04d){if(_0x46e04d){return _0x1e7909(_0x46e04d);}return _0x2b51d9(_0xc917('0x1'));});});};exports['start']=function(_0xc88e7d){return connect()[_0xc917('0x2')](function(){return new BPromise(function(_0x825e57,_0xdfab1d){return pm2[_0xc917('0x3')](_0xc88e7d,function(_0x33faa7,_0x4cccce){if(_0x33faa7){return _0xdfab1d(_0x33faa7);}pm2[_0xc917('0x4')]();return _0x825e57(_0x4cccce);});});});};exports[_0xc917('0x5')]=function(_0x4ed111){return connect()[_0xc917('0x2')](function(){return new BPromise(function(_0xefd09c,_0x4ce6cc){return pm2[_0xc917('0x5')](_0x4ed111,function(_0x26e5b4,_0x253c2a){if(_0x26e5b4){return _0x4ce6cc(_0x26e5b4);}pm2['disconnect']();return _0xefd09c(_0x253c2a);});});});};exports[_0xc917('0x6')]=function(_0x1a9bd1){return connect()[_0xc917('0x2')](function(){return new BPromise(function(_0x1763f3,_0x4b3d12){return pm2['restart'](_0x1a9bd1,function(_0x4faebc,_0xf7b318){if(_0x4faebc){return _0x4b3d12(_0x4faebc);}pm2['disconnect']();return _0x1763f3(_0xf7b318);});});});};exports['list']=function(){return connect()[_0xc917('0x2')](function(){return new BPromise(function(_0x1fcfbc,_0x15f158){return pm2[_0xc917('0x7')](function(_0x1f2814,_0x4d5bce){if(_0x1f2814){return _0x15f158(_0x1f2814);}pm2[_0xc917('0x4')]();return _0x1fcfbc(_0x4d5bce);});});});};exports[_0xc917('0x8')]=function(_0xbd29bb){return connect()[_0xc917('0x2')](function(){return new BPromise(function(_0x324495,_0x4eb705){return pm2[_0xc917('0x8')](_0xbd29bb,function(_0x2dcda2,_0x16ed31){if(_0x2dcda2){return _0x4eb705(_0x2dcda2);}pm2[_0xc917('0x4')]();return _0x324495(_0x16ed31);});});});};exports['delete']=function(_0x4e7c86){return connect()['then'](function(){return new BPromise(function(_0x23a1ca,_0x1a43f4){return pm2['delete'](_0x4e7c86,function(_0x13987f,_0x5ae340){if(_0x13987f){return _0x1a43f4(_0x13987f);}pm2[_0xc917('0x4')]();return _0x23a1ca(_0x5ae340);});});});};exports[_0xc917('0x9')]=function(){return connect()[_0xc917('0x2')](function(){return new BPromise(function(_0x4db39d,_0xb79741){return pm2[_0xc917('0x9')](function(_0x25ae22){if(_0x25ae22){return _0xb79741(_0x25ae22);}return _0x4db39d(_0xc917('0xa'));});});});};