Built motion from commit 00bf23f6.|2.6.16
[motion2.git] / server / api / intVtigerField / intVtigerField.rpc.js
index 53951aa..04f3967 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf089=['../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','then','info','request\x20sent','debug','VtigerField,\x20%s,\x20%s,\x20%s','error','VtigerField,\x20%s,\x20%s','message','util','moment','randomstring','ioredis'];(function(_0x168127,_0x59cea1){var _0x4c99ad=function(_0x4ab3f2){while(--_0x4ab3f2){_0x168127['push'](_0x168127['shift']());}};_0x4c99ad(++_0x59cea1);}(_0xf089,0xba));var _0x9f08=function(_0x27d582,_0x16853e){_0x27d582=_0x27d582-0x0;var _0x231073=_0xf089[_0x27d582];return _0x231073;};'use strict';var _=require('lodash');var util=require(_0x9f08('0x0'));var moment=require(_0x9f08('0x1'));var BPromise=require('bluebird');var rs=require(_0x9f08('0x2'));var fs=require('fs');var Redis=require(_0x9f08('0x3'));var db=require(_0x9f08('0x4'))['db'];var utils=require(_0x9f08('0x5'));var logger=require('../../config/logger')(_0x9f08('0x6'));var config=require(_0x9f08('0x7'));var jayson=require(_0x9f08('0x8'));var client=jayson[_0x9f08('0x9')][_0x9f08('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x39abe2,_0x5341c9,_0x9cfade){return new BPromise(function(_0x4b37fc,_0x39e238){return client['request'](_0x39abe2,_0x9cfade)[_0x9f08('0xb')](function(_0x286809){logger[_0x9f08('0xc')]('VtigerField,\x20%s,\x20%s',_0x5341c9,_0x9f08('0xd'));logger[_0x9f08('0xe')](_0x9f08('0xf'),_0x5341c9,'request\x20sent',JSON['stringify'](_0x286809));if(_0x286809[_0x9f08('0x10')]){if(_0x286809[_0x9f08('0x10')]['code']===0x1f4){logger[_0x9f08('0x10')](_0x9f08('0x11'),_0x5341c9,_0x286809[_0x9f08('0x10')]['message']);return _0x39e238(_0x286809['error'][_0x9f08('0x12')]);}logger[_0x9f08('0x10')](_0x9f08('0x11'),_0x5341c9,_0x286809[_0x9f08('0x10')]['message']);return _0x4b37fc(_0x286809[_0x9f08('0x10')][_0x9f08('0x12')]);}else{logger[_0x9f08('0xc')](_0x9f08('0x11'),_0x5341c9,_0x9f08('0xd'));_0x4b37fc(_0x286809['result'][_0x9f08('0x12')]);}})['catch'](function(_0x5a562c){logger[_0x9f08('0x10')](_0x9f08('0x11'),_0x5341c9,_0x5a562c);_0x39e238(_0x5a562c);});});}
\ No newline at end of file
+var _0x13e7=['debug','VtigerField,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','lodash','ioredis','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','then','info','VtigerField,\x20%s,\x20%s','request\x20sent'];(function(_0x5dad73,_0x3baac8){var _0x538654=function(_0x340cd6){while(--_0x340cd6){_0x5dad73['push'](_0x5dad73['shift']());}};_0x538654(++_0x3baac8);}(_0x13e7,0x133));var _0x713e=function(_0x16e57d,_0x2cb7ba){_0x16e57d=_0x16e57d-0x0;var _0x40239c=_0x13e7[_0x16e57d];return _0x40239c;};'use strict';var _=require(_0x713e('0x0'));var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x713e('0x1'));var db=require('../../mysqldb')['db'];var utils=require(_0x713e('0x2'));var logger=require('../../config/logger')(_0x713e('0x3'));var config=require(_0x713e('0x4'));var jayson=require(_0x713e('0x5'));var client=jayson[_0x713e('0x6')][_0x713e('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x47c066,_0x419663,_0x4e9844){return new BPromise(function(_0x4c62a9,_0x2522f4){return client[_0x713e('0x8')](_0x47c066,_0x4e9844)[_0x713e('0x9')](function(_0x283e88){logger[_0x713e('0xa')](_0x713e('0xb'),_0x419663,_0x713e('0xc'));logger[_0x713e('0xd')](_0x713e('0xe'),_0x419663,'request\x20sent',JSON['stringify'](_0x283e88));if(_0x283e88['error']){if(_0x283e88[_0x713e('0xf')][_0x713e('0x10')]===0x1f4){logger['error'](_0x713e('0xb'),_0x419663,_0x283e88['error'][_0x713e('0x11')]);return _0x2522f4(_0x283e88[_0x713e('0xf')][_0x713e('0x11')]);}logger[_0x713e('0xf')](_0x713e('0xb'),_0x419663,_0x283e88[_0x713e('0xf')][_0x713e('0x11')]);return _0x4c62a9(_0x283e88[_0x713e('0xf')]['message']);}else{logger['info'](_0x713e('0xb'),_0x419663,_0x713e('0xc'));_0x4c62a9(_0x283e88[_0x713e('0x12')][_0x713e('0x11')]);}})[_0x713e('0x13')](function(_0x322278){logger['error']('VtigerField,\x20%s,\x20%s',_0x419663,_0x322278);_0x2522f4(_0x322278);});});}
\ No newline at end of file