Built motion from commit 753c950e.|2.5.42
[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 _0x4c36=['stop','restart','list','describe','delete','saved','bluebird','./config','connect','connected','then','start','disconnect'];(function(_0x5eda7f,_0x10c0a){var _0x8f1e4a=function(_0x1dadc1){while(--_0x1dadc1){_0x5eda7f['push'](_0x5eda7f['shift']());}};_0x8f1e4a(++_0x10c0a);}(_0x4c36,0xf0));var _0x64c3=function(_0x1a1128,_0x1784d8){_0x1a1128=_0x1a1128-0x0;var _0x1f5bd2=_0x4c36[_0x1a1128];return _0x1f5bd2;};'use strict';var pm2=require('pm2');var BPromise=require(_0x64c3('0x0'));var config=require(_0x64c3('0x1'));function connect(){return new BPromise(function(_0x237ee8,_0x26b4c8){return pm2[_0x64c3('0x2')](function(_0x5cdb9e){if(_0x5cdb9e){return _0x26b4c8(_0x5cdb9e);}return _0x237ee8(_0x64c3('0x3'));});});};exports['start']=function(_0x431b43){return connect()[_0x64c3('0x4')](function(){return new BPromise(function(_0x17f593,_0x5bb250){return pm2[_0x64c3('0x5')](_0x431b43,function(_0x32546b,_0x1344dd){if(_0x32546b){return _0x5bb250(_0x32546b);}pm2[_0x64c3('0x6')]();return _0x17f593(_0x1344dd);});});});};exports[_0x64c3('0x7')]=function(_0x33b10b){return connect()[_0x64c3('0x4')](function(){return new BPromise(function(_0x1138ce,_0x4f9cbc){return pm2['stop'](_0x33b10b,function(_0x2c9ee9,_0x4c0643){if(_0x2c9ee9){return _0x4f9cbc(_0x2c9ee9);}pm2['disconnect']();return _0x1138ce(_0x4c0643);});});});};exports[_0x64c3('0x8')]=function(_0xa75bfe){return connect()[_0x64c3('0x4')](function(){return new BPromise(function(_0x420958,_0x34c8b8){return pm2[_0x64c3('0x8')](_0xa75bfe,function(_0x359cd4,_0x1e3d86){if(_0x359cd4){return _0x34c8b8(_0x359cd4);}pm2['disconnect']();return _0x420958(_0x1e3d86);});});});};exports[_0x64c3('0x9')]=function(){return connect()['then'](function(){return new BPromise(function(_0x5cfec7,_0x382231){return pm2['list'](function(_0x29b9ff,_0x16ebf8){if(_0x29b9ff){return _0x382231(_0x29b9ff);}pm2[_0x64c3('0x6')]();return _0x5cfec7(_0x16ebf8);});});});};exports[_0x64c3('0xa')]=function(_0x35b13d){return connect()['then'](function(){return new BPromise(function(_0x5d4115,_0x498d34){return pm2[_0x64c3('0xa')](_0x35b13d,function(_0x201894,_0x43f16e){if(_0x201894){return _0x498d34(_0x201894);}pm2[_0x64c3('0x6')]();return _0x5d4115(_0x43f16e);});});});};exports[_0x64c3('0xb')]=function(_0x4256f){return connect()[_0x64c3('0x4')](function(){return new BPromise(function(_0x4eb6bc,_0x4346a0){return pm2['delete'](_0x4256f,function(_0x3bc605,_0x135513){if(_0x3bc605){return _0x4346a0(_0x3bc605);}pm2[_0x64c3('0x6')]();return _0x4eb6bc(_0x135513);});});});};exports['dump']=function(){return connect()[_0x64c3('0x4')](function(){return new BPromise(function(_0x25c766,_0x5050b6){return pm2['dump'](function(_0x4fd4c4){if(_0x4fd4c4){return _0x5050b6(_0x4fd4c4);}return _0x25c766(_0x64c3('0xc'));});});});};