Built motion from commit 00bf23f6.|2.6.16
[motion2.git] / server / api / analyticMetric / analyticMetric.rpc.js
index 38ccfc0..9b8e2e8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdc36=['jayson/promise','client','http','request','then','AnalyticMetric,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','lodash','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xdc36,0x17e));var _0x6dc3=function(_0x10b2d5,_0x5a7743){_0x10b2d5=_0x10b2d5-0x0;var _0x14b8d1=_0xdc36[_0x10b2d5];return _0x14b8d1;};'use strict';var _=require(_0x6dc3('0x0'));var util=require('util');var moment=require(_0x6dc3('0x1'));var BPromise=require('bluebird');var rs=require(_0x6dc3('0x2'));var fs=require('fs');var Redis=require(_0x6dc3('0x3'));var db=require(_0x6dc3('0x4'))['db'];var utils=require(_0x6dc3('0x5'));var logger=require(_0x6dc3('0x6'))(_0x6dc3('0x7'));var config=require(_0x6dc3('0x8'));var jayson=require(_0x6dc3('0x9'));var client=jayson[_0x6dc3('0xa')][_0x6dc3('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x7b27ce,_0xef266e,_0x48558a){return new BPromise(function(_0x239031,_0x126df7){return client[_0x6dc3('0xc')](_0x7b27ce,_0x48558a)[_0x6dc3('0xd')](function(_0x965dc2){logger['info'](_0x6dc3('0xe'),_0xef266e,_0x6dc3('0xf'));logger[_0x6dc3('0x10')]('AnalyticMetric,\x20%s,\x20%s,\x20%s',_0xef266e,_0x6dc3('0xf'),JSON[_0x6dc3('0x11')](_0x965dc2));if(_0x965dc2[_0x6dc3('0x12')]){if(_0x965dc2[_0x6dc3('0x12')][_0x6dc3('0x13')]===0x1f4){logger['error'](_0x6dc3('0xe'),_0xef266e,_0x965dc2[_0x6dc3('0x12')][_0x6dc3('0x14')]);return _0x126df7(_0x965dc2[_0x6dc3('0x12')][_0x6dc3('0x14')]);}logger[_0x6dc3('0x12')](_0x6dc3('0xe'),_0xef266e,_0x965dc2[_0x6dc3('0x12')]['message']);return _0x239031(_0x965dc2['error'][_0x6dc3('0x14')]);}else{logger['info'](_0x6dc3('0xe'),_0xef266e,'request\x20sent');_0x239031(_0x965dc2[_0x6dc3('0x15')][_0x6dc3('0x14')]);}})[_0x6dc3('0x16')](function(_0x5ac6eb){logger[_0x6dc3('0x12')]('AnalyticMetric,\x20%s,\x20%s',_0xef266e,_0x5ac6eb);_0x126df7(_0x5ac6eb);});});}
\ No newline at end of file
+var _0xab4c=['jayson/promise','client','http','request','then','info','AnalyticMetric,\x20%s,\x20%s','request\x20sent','AnalyticMetric,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment'];(function(_0x4c4340,_0x357f3e){var _0x5d5889=function(_0x4e380a){while(--_0x4e380a){_0x4c4340['push'](_0x4c4340['shift']());}};_0x5d5889(++_0x357f3e);}(_0xab4c,0x158));var _0xcab4=function(_0x726624,_0x21f598){_0x726624=_0x726624-0x0;var _0x14fb9f=_0xab4c[_0x726624];return _0x14fb9f;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0xcab4('0x0'));var BPromise=require(_0xcab4('0x1'));var rs=require(_0xcab4('0x2'));var fs=require('fs');var Redis=require(_0xcab4('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0xcab4('0x4'));var logger=require(_0xcab4('0x5'))(_0xcab4('0x6'));var config=require(_0xcab4('0x7'));var jayson=require(_0xcab4('0x8'));var client=jayson[_0xcab4('0x9')][_0xcab4('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x1f5112,_0x124513,_0x304daf){return new BPromise(function(_0x16a13f,_0x43ef64){return client[_0xcab4('0xb')](_0x1f5112,_0x304daf)[_0xcab4('0xc')](function(_0x6832c0){logger[_0xcab4('0xd')](_0xcab4('0xe'),_0x124513,_0xcab4('0xf'));logger['debug'](_0xcab4('0x10'),_0x124513,_0xcab4('0xf'),JSON[_0xcab4('0x11')](_0x6832c0));if(_0x6832c0[_0xcab4('0x12')]){if(_0x6832c0['error'][_0xcab4('0x13')]===0x1f4){logger['error'](_0xcab4('0xe'),_0x124513,_0x6832c0[_0xcab4('0x12')][_0xcab4('0x14')]);return _0x43ef64(_0x6832c0[_0xcab4('0x12')][_0xcab4('0x14')]);}logger[_0xcab4('0x12')](_0xcab4('0xe'),_0x124513,_0x6832c0['error'][_0xcab4('0x14')]);return _0x16a13f(_0x6832c0[_0xcab4('0x12')][_0xcab4('0x14')]);}else{logger[_0xcab4('0xd')](_0xcab4('0xe'),_0x124513,_0xcab4('0xf'));_0x16a13f(_0x6832c0['result'][_0xcab4('0x14')]);}})[_0xcab4('0x15')](function(_0x44dae7){logger[_0xcab4('0x12')](_0xcab4('0xe'),_0x124513,_0x44dae7);_0x43ef64(_0x44dae7);});});}
\ No newline at end of file