Built motion from commit 85328c08.|2.5.50
[motion2.git] / server / api / analyticMetric / analyticMetric.rpc.js
index f4c2b7f..0645302 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x55f4=['../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','request','then','info','AnalyticMetric,\x20%s,\x20%s','debug','AnalyticMetric,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','util','moment','randomstring'];(function(_0x45f310,_0x951bb8){var _0xaf5d54=function(_0x457337){while(--_0x457337){_0x45f310['push'](_0x45f310['shift']());}};_0xaf5d54(++_0x951bb8);}(_0x55f4,0x131));var _0x455f=function(_0x470467,_0x15fcf4){_0x470467=_0x470467-0x0;var _0x5f57e9=_0x55f4[_0x470467];return _0x5f57e9;};'use strict';var _=require('lodash');var util=require(_0x455f('0x0'));var moment=require(_0x455f('0x1'));var BPromise=require('bluebird');var rs=require(_0x455f('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x455f('0x3'))['db'];var utils=require(_0x455f('0x4'));var logger=require(_0x455f('0x5'))(_0x455f('0x6'));var config=require(_0x455f('0x7'));var jayson=require(_0x455f('0x8'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x3e951a,_0x12b62e,_0x3f40ee){return new BPromise(function(_0x2f2d5f,_0xe778e7){return client[_0x455f('0x9')](_0x3e951a,_0x3f40ee)[_0x455f('0xa')](function(_0x179a24){logger[_0x455f('0xb')](_0x455f('0xc'),_0x12b62e,'request\x20sent');logger[_0x455f('0xd')](_0x455f('0xe'),_0x12b62e,_0x455f('0xf'),JSON[_0x455f('0x10')](_0x179a24));if(_0x179a24[_0x455f('0x11')]){if(_0x179a24[_0x455f('0x11')][_0x455f('0x12')]===0x1f4){logger[_0x455f('0x11')](_0x455f('0xc'),_0x12b62e,_0x179a24[_0x455f('0x11')][_0x455f('0x13')]);return _0xe778e7(_0x179a24['error'][_0x455f('0x13')]);}logger[_0x455f('0x11')](_0x455f('0xc'),_0x12b62e,_0x179a24[_0x455f('0x11')][_0x455f('0x13')]);return _0x2f2d5f(_0x179a24[_0x455f('0x11')][_0x455f('0x13')]);}else{logger['info'](_0x455f('0xc'),_0x12b62e,_0x455f('0xf'));_0x2f2d5f(_0x179a24[_0x455f('0x14')][_0x455f('0x13')]);}})[_0x455f('0x15')](function(_0x3de8e){logger[_0x455f('0x11')](_0x455f('0xc'),_0x12b62e,_0x3de8e);_0xe778e7(_0x3de8e);});});}
\ No newline at end of file
+var _0x7224=['AnalyticMetric,\x20%s,\x20%s','request\x20sent','AnalyticMetric,\x20%s,\x20%s,\x20%s','error','code','message','info','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then'];(function(_0x30804d,_0x38b1a4){var _0x3bdf9f=function(_0x3f86cf){while(--_0x3f86cf){_0x30804d['push'](_0x30804d['shift']());}};_0x3bdf9f(++_0x38b1a4);}(_0x7224,0x167));var _0x4722=function(_0x4165d6,_0x3229f5){_0x4165d6=_0x4165d6-0x0;var _0x188c3e=_0x7224[_0x4165d6];return _0x188c3e;};'use strict';var _=require(_0x4722('0x0'));var util=require(_0x4722('0x1'));var moment=require(_0x4722('0x2'));var BPromise=require(_0x4722('0x3'));var rs=require(_0x4722('0x4'));var fs=require('fs');var Redis=require(_0x4722('0x5'));var db=require(_0x4722('0x6'))['db'];var utils=require(_0x4722('0x7'));var logger=require(_0x4722('0x8'))(_0x4722('0x9'));var config=require(_0x4722('0xa'));var jayson=require(_0x4722('0xb'));var client=jayson[_0x4722('0xc')][_0x4722('0xd')]({'port':0x232a});function respondWithRpcPromise(_0x3c70bb,_0x6240a6,_0x2f92b8){return new BPromise(function(_0x32962b,_0x2f202e){return client[_0x4722('0xe')](_0x3c70bb,_0x2f92b8)[_0x4722('0xf')](function(_0x48f1d0){logger['info'](_0x4722('0x10'),_0x6240a6,_0x4722('0x11'));logger['debug'](_0x4722('0x12'),_0x6240a6,_0x4722('0x11'),JSON['stringify'](_0x48f1d0));if(_0x48f1d0[_0x4722('0x13')]){if(_0x48f1d0[_0x4722('0x13')][_0x4722('0x14')]===0x1f4){logger['error'](_0x4722('0x10'),_0x6240a6,_0x48f1d0[_0x4722('0x13')][_0x4722('0x15')]);return _0x2f202e(_0x48f1d0[_0x4722('0x13')][_0x4722('0x15')]);}logger['error']('AnalyticMetric,\x20%s,\x20%s',_0x6240a6,_0x48f1d0[_0x4722('0x13')][_0x4722('0x15')]);return _0x32962b(_0x48f1d0['error'][_0x4722('0x15')]);}else{logger[_0x4722('0x16')]('AnalyticMetric,\x20%s,\x20%s',_0x6240a6,'request\x20sent');_0x32962b(_0x48f1d0[_0x4722('0x17')][_0x4722('0x15')]);}})[_0x4722('0x18')](function(_0xa3cdf1){logger['error'](_0x4722('0x10'),_0x6240a6,_0xa3cdf1);_0x2f202e(_0xa3cdf1);});});}
\ No newline at end of file