778a9489cc040b0e3fb4e2ae2bf81552fe52aab5
[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 _0xdd54=['stop','disconnect','restart','list','describe','delete','dump','pm2','bluebird','./config','connect','then','start'];(function(_0x2641f9,_0x26715f){var _0x585741=function(_0x2d1462){while(--_0x2d1462){_0x2641f9['push'](_0x2641f9['shift']());}};_0x585741(++_0x26715f);}(_0xdd54,0x159));var _0x4dd5=function(_0x5738f7,_0x17df47){_0x5738f7=_0x5738f7-0x0;var _0x2e6d3c=_0xdd54[_0x5738f7];return _0x2e6d3c;};'use strict';var pm2=require(_0x4dd5('0x0'));var BPromise=require(_0x4dd5('0x1'));var config=require(_0x4dd5('0x2'));function connect(){return new BPromise(function(_0x29b277,_0x4a42cf){return pm2[_0x4dd5('0x3')](function(_0x11a9a2){if(_0x11a9a2){return _0x4a42cf(_0x11a9a2);}return _0x29b277('connected');});});};exports['start']=function(_0x3de4b1){return connect()[_0x4dd5('0x4')](function(){return new BPromise(function(_0x4656e5,_0x20b2ec){return pm2[_0x4dd5('0x5')](_0x3de4b1,function(_0x447b6c,_0x3df13a){if(_0x447b6c){return _0x20b2ec(_0x447b6c);}pm2['disconnect']();return _0x4656e5(_0x3df13a);});});});};exports[_0x4dd5('0x6')]=function(_0x1e3094){return connect()[_0x4dd5('0x4')](function(){return new BPromise(function(_0x2dbfef,_0x2122da){return pm2['stop'](_0x1e3094,function(_0x2d913e,_0x1012af){if(_0x2d913e){return _0x2122da(_0x2d913e);}pm2[_0x4dd5('0x7')]();return _0x2dbfef(_0x1012af);});});});};exports[_0x4dd5('0x8')]=function(_0x1f5457){return connect()['then'](function(){return new BPromise(function(_0x2c2daf,_0x4f18c7){return pm2[_0x4dd5('0x8')](_0x1f5457,function(_0x49b2ee,_0x4a8d6c){if(_0x49b2ee){return _0x4f18c7(_0x49b2ee);}pm2['disconnect']();return _0x2c2daf(_0x4a8d6c);});});});};exports['list']=function(){return connect()[_0x4dd5('0x4')](function(){return new BPromise(function(_0x48b6c9,_0x180efa){return pm2[_0x4dd5('0x9')](function(_0x56b60d,_0x443f53){if(_0x56b60d){return _0x180efa(_0x56b60d);}pm2[_0x4dd5('0x7')]();return _0x48b6c9(_0x443f53);});});});};exports['describe']=function(_0x49fb55){return connect()['then'](function(){return new BPromise(function(_0x366765,_0x266f4c){return pm2[_0x4dd5('0xa')](_0x49fb55,function(_0x225ba8,_0x5d41a4){if(_0x225ba8){return _0x266f4c(_0x225ba8);}pm2[_0x4dd5('0x7')]();return _0x366765(_0x5d41a4);});});});};exports[_0x4dd5('0xb')]=function(_0x2b6b33){return connect()[_0x4dd5('0x4')](function(){return new BPromise(function(_0x38840b,_0x4125cb){return pm2[_0x4dd5('0xb')](_0x2b6b33,function(_0x379098,_0x1d70c4){if(_0x379098){return _0x4125cb(_0x379098);}pm2[_0x4dd5('0x7')]();return _0x38840b(_0x1d70c4);});});});};exports[_0x4dd5('0xc')]=function(){return connect()['then'](function(){return new BPromise(function(_0x273adc,_0x492f1f){return pm2['dump'](function(_0x32e746){if(_0x32e746){return _0x492f1f(_0x32e746);}return _0x273adc('saved');});});});};