0426a93c9bc8310908fee63701537fbaed19d09a
[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 _0x3151=['bluebird','./config','connect','start','then','disconnect','stop','restart','delete','dump','saved','pm2'];(function(_0x51020b,_0x38c2c7){var _0x371e47=function(_0x2a538f){while(--_0x2a538f){_0x51020b['push'](_0x51020b['shift']());}};_0x371e47(++_0x38c2c7);}(_0x3151,0x173));var _0x1315=function(_0x323682,_0x987916){_0x323682=_0x323682-0x0;var _0x5c983d=_0x3151[_0x323682];return _0x5c983d;};'use strict';var pm2=require(_0x1315('0x0'));var BPromise=require(_0x1315('0x1'));var config=require(_0x1315('0x2'));function connect(){return new BPromise(function(_0x151d48,_0x10bd0e){return pm2[_0x1315('0x3')](function(_0x149b1b){if(_0x149b1b){return _0x10bd0e(_0x149b1b);}return _0x151d48('connected');});});};exports[_0x1315('0x4')]=function(_0x340700){return connect()[_0x1315('0x5')](function(){return new BPromise(function(_0x38600f,_0x4306e8){return pm2[_0x1315('0x4')](_0x340700,function(_0x43c09e,_0x36dd93){if(_0x43c09e){return _0x4306e8(_0x43c09e);}pm2[_0x1315('0x6')]();return _0x38600f(_0x36dd93);});});});};exports[_0x1315('0x7')]=function(_0x4a92f9){return connect()[_0x1315('0x5')](function(){return new BPromise(function(_0x2c5526,_0x3219f0){return pm2[_0x1315('0x7')](_0x4a92f9,function(_0x42a9be,_0x4a9695){if(_0x42a9be){return _0x3219f0(_0x42a9be);}pm2[_0x1315('0x6')]();return _0x2c5526(_0x4a9695);});});});};exports[_0x1315('0x8')]=function(_0x560be9){return connect()[_0x1315('0x5')](function(){return new BPromise(function(_0x295495,_0x231182){return pm2['restart'](_0x560be9,function(_0x6c05b1,_0x4813ae){if(_0x6c05b1){return _0x231182(_0x6c05b1);}pm2['disconnect']();return _0x295495(_0x4813ae);});});});};exports['list']=function(){return connect()[_0x1315('0x5')](function(){return new BPromise(function(_0x4040f3,_0x2cd735){return pm2['list'](function(_0x4b537a,_0x5576f0){if(_0x4b537a){return _0x2cd735(_0x4b537a);}pm2[_0x1315('0x6')]();return _0x4040f3(_0x5576f0);});});});};exports['describe']=function(_0x5b6794){return connect()[_0x1315('0x5')](function(){return new BPromise(function(_0x273746,_0xa7dd0f){return pm2['describe'](_0x5b6794,function(_0x33e501,_0x3707d6){if(_0x33e501){return _0xa7dd0f(_0x33e501);}pm2[_0x1315('0x6')]();return _0x273746(_0x3707d6);});});});};exports[_0x1315('0x9')]=function(_0x4de4f9){return connect()[_0x1315('0x5')](function(){return new BPromise(function(_0x492489,_0x28d483){return pm2['delete'](_0x4de4f9,function(_0x198eb1,_0x4b6727){if(_0x198eb1){return _0x28d483(_0x198eb1);}pm2['disconnect']();return _0x492489(_0x4b6727);});});});};exports[_0x1315('0xa')]=function(){return connect()[_0x1315('0x5')](function(){return new BPromise(function(_0x3eb411,_0x3a3dfb){return pm2[_0x1315('0xa')](function(_0x4adf33){if(_0x4adf33){return _0x3a3dfb(_0x4adf33);}return _0x3eb411(_0x1315('0xb'));});});});};