Built motion from commit (unavailable).|2.5.30
[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 _0x6459=['request\x20sent','debug','VtigerConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','message','VtigerConfiguration,\x20%s,\x20%s','result','catch','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info'];(function(_0x5b685e,_0x3e69ad){var _0x9a0173=function(_0x5cc6ad){while(--_0x5cc6ad){_0x5b685e['push'](_0x5b685e['shift']());}};_0x9a0173(++_0x3e69ad);}(_0x6459,0x1a2));var _0x9645=function(_0x3d7bd1,_0x3f5bca){_0x3d7bd1=_0x3d7bd1-0x0;var _0x574966=_0x6459[_0x3d7bd1];return _0x574966;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x9645('0x0'));var BPromise=require(_0x9645('0x1'));var rs=require(_0x9645('0x2'));var fs=require('fs');var Redis=require(_0x9645('0x3'));var db=require(_0x9645('0x4'))['db'];var utils=require(_0x9645('0x5'));var logger=require(_0x9645('0x6'))(_0x9645('0x7'));var config=require(_0x9645('0x8'));var jayson=require(_0x9645('0x9'));var client=jayson['client'][_0x9645('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x2efc0e,_0x323812,_0x239e58){return new BPromise(function(_0x5b360b,_0x272500){return client[_0x9645('0xb')](_0x2efc0e,_0x239e58)[_0x9645('0xc')](function(_0x2147ef){logger[_0x9645('0xd')]('VtigerConfiguration,\x20%s,\x20%s',_0x323812,_0x9645('0xe'));logger[_0x9645('0xf')](_0x9645('0x10'),_0x323812,'request\x20sent',JSON[_0x9645('0x11')](_0x2147ef));if(_0x2147ef[_0x9645('0x12')]){if(_0x2147ef[_0x9645('0x12')][_0x9645('0x13')]===0x1f4){logger[_0x9645('0x12')]('VtigerConfiguration,\x20%s,\x20%s',_0x323812,_0x2147ef[_0x9645('0x12')]['message']);return _0x272500(_0x2147ef[_0x9645('0x12')][_0x9645('0x14')]);}logger[_0x9645('0x12')](_0x9645('0x15'),_0x323812,_0x2147ef[_0x9645('0x12')][_0x9645('0x14')]);return _0x5b360b(_0x2147ef['error']['message']);}else{logger[_0x9645('0xd')]('VtigerConfiguration,\x20%s,\x20%s',_0x323812,'request\x20sent');_0x5b360b(_0x2147ef[_0x9645('0x16')][_0x9645('0x14')]);}})[_0x9645('0x17')](function(_0x1219d5){logger[_0x9645('0x12')](_0x9645('0x15'),_0x323812,_0x1219d5);_0x272500(_0x1219d5);});});}