Built motion from commit ab870f9e.|2.5.44
[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 _0x321d=['then','disconnect','stop','restart','list','describe','delete','saved','bluebird','./config','connect','connected','start'];(function(_0x503588,_0x526c21){var _0x185e99=function(_0x89193a){while(--_0x89193a){_0x503588['push'](_0x503588['shift']());}};_0x185e99(++_0x526c21);}(_0x321d,0xa4));var _0xd321=function(_0x5aa2d7,_0x5260f6){_0x5aa2d7=_0x5aa2d7-0x0;var _0x2f3bb8=_0x321d[_0x5aa2d7];return _0x2f3bb8;};'use strict';var pm2=require('pm2');var BPromise=require(_0xd321('0x0'));var config=require(_0xd321('0x1'));function connect(){return new BPromise(function(_0x4792c5,_0x3ae0b4){return pm2[_0xd321('0x2')](function(_0x19bbb8){if(_0x19bbb8){return _0x3ae0b4(_0x19bbb8);}return _0x4792c5(_0xd321('0x3'));});});};exports[_0xd321('0x4')]=function(_0x16fc1a){return connect()[_0xd321('0x5')](function(){return new BPromise(function(_0x27f738,_0x44f07d){return pm2['start'](_0x16fc1a,function(_0x14d62a,_0x41d2c3){if(_0x14d62a){return _0x44f07d(_0x14d62a);}pm2[_0xd321('0x6')]();return _0x27f738(_0x41d2c3);});});});};exports['stop']=function(_0x2979f8){return connect()[_0xd321('0x5')](function(){return new BPromise(function(_0x1777aa,_0xf76418){return pm2[_0xd321('0x7')](_0x2979f8,function(_0x523cb2,_0x5b8d0b){if(_0x523cb2){return _0xf76418(_0x523cb2);}pm2[_0xd321('0x6')]();return _0x1777aa(_0x5b8d0b);});});});};exports[_0xd321('0x8')]=function(_0x231598){return connect()[_0xd321('0x5')](function(){return new BPromise(function(_0x1abce8,_0x342504){return pm2['restart'](_0x231598,function(_0xfaccc7,_0x18d8a0){if(_0xfaccc7){return _0x342504(_0xfaccc7);}pm2[_0xd321('0x6')]();return _0x1abce8(_0x18d8a0);});});});};exports[_0xd321('0x9')]=function(){return connect()[_0xd321('0x5')](function(){return new BPromise(function(_0xfd7d82,_0x5df44d){return pm2[_0xd321('0x9')](function(_0x2d3d38,_0x1adda3){if(_0x2d3d38){return _0x5df44d(_0x2d3d38);}pm2[_0xd321('0x6')]();return _0xfd7d82(_0x1adda3);});});});};exports[_0xd321('0xa')]=function(_0x41b7dc){return connect()[_0xd321('0x5')](function(){return new BPromise(function(_0x3e7f98,_0x3edb59){return pm2[_0xd321('0xa')](_0x41b7dc,function(_0x1ec945,_0x34c099){if(_0x1ec945){return _0x3edb59(_0x1ec945);}pm2[_0xd321('0x6')]();return _0x3e7f98(_0x34c099);});});});};exports[_0xd321('0xb')]=function(_0x49e83a){return connect()['then'](function(){return new BPromise(function(_0x4e6666,_0x150bff){return pm2['delete'](_0x49e83a,function(_0x5ae961,_0x50b92a){if(_0x5ae961){return _0x150bff(_0x5ae961);}pm2[_0xd321('0x6')]();return _0x4e6666(_0x50b92a);});});});};exports['dump']=function(){return connect()['then'](function(){return new BPromise(function(_0x176c57,_0x33ef44){return pm2['dump'](function(_0x360025){if(_0x360025){return _0x33ef44(_0x360025);}return _0x176c57(_0xd321('0xc'));});});});};