Built motion from commit 936e8062.|2.5.33
[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 _0x93af=['../../mysqldb','rpc','../../config/environment','jayson/promise','client','request','then','info','VtigerConfiguration,\x20%s,\x20%s','request\x20sent','debug','VtigerConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','moment','bluebird','randomstring','ioredis'];(function(_0x5768b0,_0x4ffb64){var _0x44d203=function(_0x40e9dc){while(--_0x40e9dc){_0x5768b0['push'](_0x5768b0['shift']());}};_0x44d203(++_0x4ffb64);}(_0x93af,0xce));var _0xf93a=function(_0x999b85,_0x1edc2b){_0x999b85=_0x999b85-0x0;var _0x1d7124=_0x93af[_0x999b85];return _0x1d7124;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0xf93a('0x0'));var BPromise=require(_0xf93a('0x1'));var rs=require(_0xf93a('0x2'));var fs=require('fs');var Redis=require(_0xf93a('0x3'));var db=require(_0xf93a('0x4'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xf93a('0x5'));var config=require(_0xf93a('0x6'));var jayson=require(_0xf93a('0x7'));var client=jayson[_0xf93a('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0xaaaf40,_0x164694,_0x23c9f2){return new BPromise(function(_0x99e2c4,_0x5d2f69){return client[_0xf93a('0x9')](_0xaaaf40,_0x23c9f2)[_0xf93a('0xa')](function(_0x250b6f){logger[_0xf93a('0xb')](_0xf93a('0xc'),_0x164694,_0xf93a('0xd'));logger[_0xf93a('0xe')](_0xf93a('0xf'),_0x164694,_0xf93a('0xd'),JSON[_0xf93a('0x10')](_0x250b6f));if(_0x250b6f['error']){if(_0x250b6f[_0xf93a('0x11')][_0xf93a('0x12')]===0x1f4){logger[_0xf93a('0x11')](_0xf93a('0xc'),_0x164694,_0x250b6f[_0xf93a('0x11')][_0xf93a('0x13')]);return _0x5d2f69(_0x250b6f['error'][_0xf93a('0x13')]);}logger[_0xf93a('0x11')](_0xf93a('0xc'),_0x164694,_0x250b6f[_0xf93a('0x11')][_0xf93a('0x13')]);return _0x99e2c4(_0x250b6f['error'][_0xf93a('0x13')]);}else{logger['info']('VtigerConfiguration,\x20%s,\x20%s',_0x164694,_0xf93a('0xd'));_0x99e2c4(_0x250b6f[_0xf93a('0x14')]['message']);}})['catch'](function(_0x25365b){logger[_0xf93a('0x11')](_0xf93a('0xc'),_0x164694,_0x25365b);_0x5d2f69(_0x25365b);});});}