Built motion from commit 85328c08.|2.5.50
[motion2.git] / server / api / analyticMetric / analyticMetric.rpc.js
index ccd4495..0645302 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd3ab=['AnalyticMetric,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','result','catch','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request'];(function(_0x5367d0,_0x5dcc29){var _0x512d20=function(_0x4dfbb1){while(--_0x4dfbb1){_0x5367d0['push'](_0x5367d0['shift']());}};_0x512d20(++_0x5dcc29);}(_0xd3ab,0x169));var _0xbd3a=function(_0x5c6311,_0x173bdd){_0x5c6311=_0x5c6311-0x0;var _0x3977a8=_0xd3ab[_0x5c6311];return _0x3977a8;};'use strict';var _=require('lodash');var util=require(_0xbd3a('0x0'));var moment=require(_0xbd3a('0x1'));var BPromise=require(_0xbd3a('0x2'));var rs=require(_0xbd3a('0x3'));var fs=require('fs');var Redis=require(_0xbd3a('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xbd3a('0x5'));var logger=require(_0xbd3a('0x6'))(_0xbd3a('0x7'));var config=require(_0xbd3a('0x8'));var jayson=require(_0xbd3a('0x9'));var client=jayson[_0xbd3a('0xa')][_0xbd3a('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x1d2582,_0x59e7e3,_0x21c614){return new BPromise(function(_0x9f396b,_0x32dd26){return client[_0xbd3a('0xc')](_0x1d2582,_0x21c614)['then'](function(_0x8e42b8){logger['info'](_0xbd3a('0xd'),_0x59e7e3,'request\x20sent');logger['debug']('AnalyticMetric,\x20%s,\x20%s,\x20%s',_0x59e7e3,_0xbd3a('0xe'),JSON[_0xbd3a('0xf')](_0x8e42b8));if(_0x8e42b8[_0xbd3a('0x10')]){if(_0x8e42b8[_0xbd3a('0x10')][_0xbd3a('0x11')]===0x1f4){logger[_0xbd3a('0x10')](_0xbd3a('0xd'),_0x59e7e3,_0x8e42b8[_0xbd3a('0x10')]['message']);return _0x32dd26(_0x8e42b8['error'][_0xbd3a('0x12')]);}logger['error'](_0xbd3a('0xd'),_0x59e7e3,_0x8e42b8['error'][_0xbd3a('0x12')]);return _0x9f396b(_0x8e42b8[_0xbd3a('0x10')]['message']);}else{logger[_0xbd3a('0x13')](_0xbd3a('0xd'),_0x59e7e3,_0xbd3a('0xe'));_0x9f396b(_0x8e42b8[_0xbd3a('0x14')][_0xbd3a('0x12')]);}})[_0xbd3a('0x15')](function(_0x375bfb){logger['error'](_0xbd3a('0xd'),_0x59e7e3,_0x375bfb);_0x32dd26(_0x375bfb);});});}
\ 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