Built motion from commit (unavailable).|2.4.18
[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 _0x722c=['pm2','connect','connected','start','disconnect','then','stop','restart','list','describe','delete'];(function(_0x35c55f,_0x76201){var _0x592ac9=function(_0x31c4e9){while(--_0x31c4e9){_0x35c55f['push'](_0x35c55f['shift']());}};_0x592ac9(++_0x76201);}(_0x722c,0x1e4));var _0xc722=function(_0x40f5b7,_0xb3243e){_0x40f5b7=_0x40f5b7-0x0;var _0x3c884a=_0x722c[_0x40f5b7];return _0x3c884a;};'use strict';var pm2=require(_0xc722('0x0'));var BPromise=require('bluebird');var config=require('./config');function connect(){return new BPromise(function(_0xb7b69c,_0x11687d){return pm2[_0xc722('0x1')](function(_0x465911){if(_0x465911){return _0x11687d(_0x465911);}return _0xb7b69c(_0xc722('0x2'));});});};exports['start']=function(_0x4e4541){return connect()['then'](function(){return new BPromise(function(_0x5b7273,_0x476bee){return pm2[_0xc722('0x3')](_0x4e4541,function(_0x2976e5,_0x419b21){if(_0x2976e5){return _0x476bee(_0x2976e5);}pm2[_0xc722('0x4')]();return _0x5b7273(_0x419b21);});});});};exports['stop']=function(_0x25f79a){return connect()[_0xc722('0x5')](function(){return new BPromise(function(_0x2cdd26,_0xb55f5b){return pm2[_0xc722('0x6')](_0x25f79a,function(_0x4eb68f,_0x35b2cd){if(_0x4eb68f){return _0xb55f5b(_0x4eb68f);}pm2[_0xc722('0x4')]();return _0x2cdd26(_0x35b2cd);});});});};exports[_0xc722('0x7')]=function(_0x58f959){return connect()[_0xc722('0x5')](function(){return new BPromise(function(_0x5d8d97,_0x290c96){return pm2['restart'](_0x58f959,function(_0xe4da87,_0x20ed54){if(_0xe4da87){return _0x290c96(_0xe4da87);}pm2[_0xc722('0x4')]();return _0x5d8d97(_0x20ed54);});});});};exports[_0xc722('0x8')]=function(){return connect()[_0xc722('0x5')](function(){return new BPromise(function(_0x1e8f89,_0x46f157){return pm2[_0xc722('0x8')](function(_0x2f2792,_0x484fa4){if(_0x2f2792){return _0x46f157(_0x2f2792);}pm2[_0xc722('0x4')]();return _0x1e8f89(_0x484fa4);});});});};exports[_0xc722('0x9')]=function(_0x5ecc90){return connect()[_0xc722('0x5')](function(){return new BPromise(function(_0xd13399,_0x368220){return pm2[_0xc722('0x9')](_0x5ecc90,function(_0x2f3f14,_0x422919){if(_0x2f3f14){return _0x368220(_0x2f3f14);}pm2[_0xc722('0x4')]();return _0xd13399(_0x422919);});});});};exports[_0xc722('0xa')]=function(_0x558867){return connect()['then'](function(){return new BPromise(function(_0x519f9a,_0x1025b4){return pm2['delete'](_0x558867,function(_0x40d8df,_0x2260ff){if(_0x40d8df){return _0x1025b4(_0x40d8df);}pm2[_0xc722('0x4')]();return _0x519f9a(_0x2260ff);});});});};exports['dump']=function(){return connect()[_0xc722('0x5')](function(){return new BPromise(function(_0xbbadc6,_0x5b806d){return pm2['dump'](function(_0x5eedaf){if(_0x5eedaf){return _0x5b806d(_0x5eedaf);}return _0xbbadc6('saved');});});});};