Built motion from commit 43538d75.|2.5.35
[motion2.git] / server / api / intVtigerConfiguration / intVtigerConfiguration.rpc.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 _0x22df=['code','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','../../config/environment','jayson/promise','http','request','info','VtigerConfiguration,\x20%s,\x20%s','request\x20sent','debug','VtigerConfiguration,\x20%s,\x20%s,\x20%s','stringify','error'];(function(_0x2a7c2a,_0x37cc9e){var _0x195732=function(_0x4d3902){while(--_0x4d3902){_0x2a7c2a['push'](_0x2a7c2a['shift']());}};_0x195732(++_0x37cc9e);}(_0x22df,0x1d0));var _0xf22d=function(_0x46f94f,_0x273aa4){_0x46f94f=_0x46f94f-0x0;var _0x5db106=_0x22df[_0x46f94f];return _0x5db106;};'use strict';var _=require(_0xf22d('0x0'));var util=require(_0xf22d('0x1'));var moment=require(_0xf22d('0x2'));var BPromise=require(_0xf22d('0x3'));var rs=require(_0xf22d('0x4'));var fs=require('fs');var Redis=require(_0xf22d('0x5'));var db=require(_0xf22d('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0xf22d('0x7'))('rpc');var config=require(_0xf22d('0x8'));var jayson=require(_0xf22d('0x9'));var client=jayson['client'][_0xf22d('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x29c6d0,_0x560a8c,_0x52bf6e){return new BPromise(function(_0x34dd9d,_0x51582a){return client[_0xf22d('0xb')](_0x29c6d0,_0x52bf6e)['then'](function(_0x1eec2c){logger[_0xf22d('0xc')](_0xf22d('0xd'),_0x560a8c,_0xf22d('0xe'));logger[_0xf22d('0xf')](_0xf22d('0x10'),_0x560a8c,_0xf22d('0xe'),JSON[_0xf22d('0x11')](_0x1eec2c));if(_0x1eec2c[_0xf22d('0x12')]){if(_0x1eec2c['error'][_0xf22d('0x13')]===0x1f4){logger[_0xf22d('0x12')]('VtigerConfiguration,\x20%s,\x20%s',_0x560a8c,_0x1eec2c[_0xf22d('0x12')][_0xf22d('0x14')]);return _0x51582a(_0x1eec2c['error'][_0xf22d('0x14')]);}logger[_0xf22d('0x12')](_0xf22d('0xd'),_0x560a8c,_0x1eec2c[_0xf22d('0x12')][_0xf22d('0x14')]);return _0x34dd9d(_0x1eec2c[_0xf22d('0x12')][_0xf22d('0x14')]);}else{logger[_0xf22d('0xc')](_0xf22d('0xd'),_0x560a8c,'request\x20sent');_0x34dd9d(_0x1eec2c[_0xf22d('0x15')][_0xf22d('0x14')]);}})[_0xf22d('0x16')](function(_0x32294f){logger[_0xf22d('0x12')](_0xf22d('0xd'),_0x560a8c,_0x32294f);_0x51582a(_0x32294f);});});}