Built motion from commit 3c2ce842.|2.6.31
[motion2.git] / server / api / analyticMetric / analyticMetric.rpc.js
index 8e149cc..b64d771 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc03a=['result','catch','util','moment','bluebird','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','client','request','then','info','AnalyticMetric,\x20%s,\x20%s','request\x20sent','debug','AnalyticMetric,\x20%s,\x20%s,\x20%s','error','code','message'];(function(_0x599f50,_0x1e036f){var _0x5a4185=function(_0x2cb539){while(--_0x2cb539){_0x599f50['push'](_0x599f50['shift']());}};_0x5a4185(++_0x1e036f);}(_0xc03a,0x152));var _0xac03=function(_0x55a3a2,_0x200a5c){_0x55a3a2=_0x55a3a2-0x0;var _0x4cfc91=_0xc03a[_0x55a3a2];return _0x4cfc91;};'use strict';var _=require('lodash');var util=require(_0xac03('0x0'));var moment=require(_0xac03('0x1'));var BPromise=require(_0xac03('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xac03('0x3'));var db=require(_0xac03('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xac03('0x5'))(_0xac03('0x6'));var config=require(_0xac03('0x7'));var jayson=require('jayson/promise');var client=jayson[_0xac03('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x26ec43,_0x5aef43,_0x388c02){return new BPromise(function(_0x1d8d83,_0x243d5d){return client[_0xac03('0x9')](_0x26ec43,_0x388c02)[_0xac03('0xa')](function(_0x3aab6b){logger[_0xac03('0xb')](_0xac03('0xc'),_0x5aef43,_0xac03('0xd'));logger[_0xac03('0xe')](_0xac03('0xf'),_0x5aef43,_0xac03('0xd'),JSON['stringify'](_0x3aab6b));if(_0x3aab6b[_0xac03('0x10')]){if(_0x3aab6b['error'][_0xac03('0x11')]===0x1f4){logger[_0xac03('0x10')](_0xac03('0xc'),_0x5aef43,_0x3aab6b[_0xac03('0x10')]['message']);return _0x243d5d(_0x3aab6b['error'][_0xac03('0x12')]);}logger[_0xac03('0x10')](_0xac03('0xc'),_0x5aef43,_0x3aab6b['error'][_0xac03('0x12')]);return _0x1d8d83(_0x3aab6b['error'][_0xac03('0x12')]);}else{logger[_0xac03('0xb')](_0xac03('0xc'),_0x5aef43,'request\x20sent');_0x1d8d83(_0x3aab6b[_0xac03('0x13')][_0xac03('0x12')]);}})[_0xac03('0x14')](function(_0x5c348e){logger[_0xac03('0x10')](_0xac03('0xc'),_0x5aef43,_0x5c348e);_0x243d5d(_0x5c348e);});});}
\ No newline at end of file
+var _0x9fd6=['message','info','result','catch','lodash','util','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise','http','request','then','AnalyticMetric,\x20%s,\x20%s','request\x20sent','debug','AnalyticMetric,\x20%s,\x20%s,\x20%s','stringify','error'];(function(_0x179e11,_0xf65436){var _0x549f04=function(_0x610545){while(--_0x610545){_0x179e11['push'](_0x179e11['shift']());}};_0x549f04(++_0xf65436);}(_0x9fd6,0xf6));var _0x69fd=function(_0x57b54c,_0x54ce0d){_0x57b54c=_0x57b54c-0x0;var _0x59cc19=_0x9fd6[_0x57b54c];return _0x59cc19;};'use strict';var _=require(_0x69fd('0x0'));var util=require(_0x69fd('0x1'));var moment=require('moment');var BPromise=require(_0x69fd('0x2'));var rs=require(_0x69fd('0x3'));var fs=require('fs');var Redis=require(_0x69fd('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x69fd('0x5'));var logger=require(_0x69fd('0x6'))('rpc');var config=require(_0x69fd('0x7'));var jayson=require(_0x69fd('0x8'));var client=jayson['client'][_0x69fd('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x3f03c4,_0x563d85,_0x5ef488){return new BPromise(function(_0x4e08ee,_0x48800b){return client[_0x69fd('0xa')](_0x3f03c4,_0x5ef488)[_0x69fd('0xb')](function(_0x804da4){logger['info'](_0x69fd('0xc'),_0x563d85,_0x69fd('0xd'));logger[_0x69fd('0xe')](_0x69fd('0xf'),_0x563d85,_0x69fd('0xd'),JSON[_0x69fd('0x10')](_0x804da4));if(_0x804da4['error']){if(_0x804da4[_0x69fd('0x11')]['code']===0x1f4){logger[_0x69fd('0x11')](_0x69fd('0xc'),_0x563d85,_0x804da4['error'][_0x69fd('0x12')]);return _0x48800b(_0x804da4[_0x69fd('0x11')][_0x69fd('0x12')]);}logger[_0x69fd('0x11')](_0x69fd('0xc'),_0x563d85,_0x804da4[_0x69fd('0x11')][_0x69fd('0x12')]);return _0x4e08ee(_0x804da4[_0x69fd('0x11')][_0x69fd('0x12')]);}else{logger[_0x69fd('0x13')]('AnalyticMetric,\x20%s,\x20%s',_0x563d85,_0x69fd('0xd'));_0x4e08ee(_0x804da4[_0x69fd('0x14')][_0x69fd('0x12')]);}})[_0x69fd('0x15')](function(_0x11f7a9){logger[_0x69fd('0x11')](_0x69fd('0xc'),_0x563d85,_0x11f7a9);_0x48800b(_0x11f7a9);});});}
\ No newline at end of file