Built motion from commit 58b0471d.|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 _0x89f8=['dump','bluebird','connect','connected','start','stop','then','disconnect','restart','list','describe','delete'];(function(_0x3a539b,_0x1d5b66){var _0x368af=function(_0x5accf8){while(--_0x5accf8){_0x3a539b['push'](_0x3a539b['shift']());}};_0x368af(++_0x1d5b66);}(_0x89f8,0x79));var _0x889f=function(_0x2f32ad,_0x41a394){_0x2f32ad=_0x2f32ad-0x0;var _0xe5e48c=_0x89f8[_0x2f32ad];return _0xe5e48c;};'use strict';var pm2=require('pm2');var BPromise=require(_0x889f('0x0'));var config=require('./config');function connect(){return new BPromise(function(_0x42e526,_0x485a49){return pm2[_0x889f('0x1')](function(_0x3b42ff){if(_0x3b42ff){return _0x485a49(_0x3b42ff);}return _0x42e526(_0x889f('0x2'));});});};exports['start']=function(_0x1fb7c0){return connect()['then'](function(){return new BPromise(function(_0xd44b8a,_0x13a3a4){return pm2[_0x889f('0x3')](_0x1fb7c0,function(_0x307bb4,_0xfe2220){if(_0x307bb4){return _0x13a3a4(_0x307bb4);}pm2['disconnect']();return _0xd44b8a(_0xfe2220);});});});};exports[_0x889f('0x4')]=function(_0x564b17){return connect()[_0x889f('0x5')](function(){return new BPromise(function(_0x3e9234,_0x19218f){return pm2[_0x889f('0x4')](_0x564b17,function(_0x1eaaf1,_0x3f2eb9){if(_0x1eaaf1){return _0x19218f(_0x1eaaf1);}pm2[_0x889f('0x6')]();return _0x3e9234(_0x3f2eb9);});});});};exports['restart']=function(_0x33832e){return connect()[_0x889f('0x5')](function(){return new BPromise(function(_0x29ae69,_0x17374f){return pm2[_0x889f('0x7')](_0x33832e,function(_0x5a03a5,_0x18d06a){if(_0x5a03a5){return _0x17374f(_0x5a03a5);}pm2[_0x889f('0x6')]();return _0x29ae69(_0x18d06a);});});});};exports[_0x889f('0x8')]=function(){return connect()['then'](function(){return new BPromise(function(_0x36445e,_0x5abc8e){return pm2[_0x889f('0x8')](function(_0x2217e6,_0x2e0f65){if(_0x2217e6){return _0x5abc8e(_0x2217e6);}pm2[_0x889f('0x6')]();return _0x36445e(_0x2e0f65);});});});};exports['describe']=function(_0x45928f){return connect()[_0x889f('0x5')](function(){return new BPromise(function(_0x5bae14,_0x42a614){return pm2[_0x889f('0x9')](_0x45928f,function(_0xc1e535,_0x136f1e){if(_0xc1e535){return _0x42a614(_0xc1e535);}pm2[_0x889f('0x6')]();return _0x5bae14(_0x136f1e);});});});};exports['delete']=function(_0xa0c7a1){return connect()[_0x889f('0x5')](function(){return new BPromise(function(_0x27cc73,_0x11fd34){return pm2[_0x889f('0xa')](_0xa0c7a1,function(_0x54cfa8,_0x10a8d8){if(_0x54cfa8){return _0x11fd34(_0x54cfa8);}pm2[_0x889f('0x6')]();return _0x27cc73(_0x10a8d8);});});});};exports['dump']=function(){return connect()[_0x889f('0x5')](function(){return new BPromise(function(_0x296877,_0x5e7d3c){return pm2[_0x889f('0xb')](function(_0x2add52){if(_0x2add52){return _0x5e7d3c(_0x2add52);}return _0x296877('saved');});});});};