Built motion from commit (unavailable).|2.5.14
[motion2.git] / server / api / analyticMetric / analyticMetric.rpc.js
index a82ef74..8ed4178 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xcc6b=['../../config/logger','rpc','../../config/environment','jayson/promise','http','AnalyticMetric,\x20%s,\x20%s','request\x20sent','debug','AnalyticMetric,\x20%s,\x20%s,\x20%s','stringify','error','message','info','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils'];(function(_0x20f4fa,_0x434923){var _0x3111ed=function(_0xe3e453){while(--_0xe3e453){_0x20f4fa['push'](_0x20f4fa['shift']());}};_0x3111ed(++_0x434923);}(_0xcc6b,0x82));var _0xbcc6=function(_0x4bdb8d,_0x288010){_0x4bdb8d=_0x4bdb8d-0x0;var _0x46d352=_0xcc6b[_0x4bdb8d];return _0x46d352;};'use strict';var _=require(_0xbcc6('0x0'));var util=require(_0xbcc6('0x1'));var moment=require(_0xbcc6('0x2'));var BPromise=require(_0xbcc6('0x3'));var rs=require(_0xbcc6('0x4'));var fs=require('fs');var Redis=require(_0xbcc6('0x5'));var db=require(_0xbcc6('0x6'))['db'];var utils=require(_0xbcc6('0x7'));var logger=require(_0xbcc6('0x8'))(_0xbcc6('0x9'));var config=require(_0xbcc6('0xa'));var jayson=require(_0xbcc6('0xb'));var client=jayson['client'][_0xbcc6('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x4ef613,_0xa293ac,_0x3327be){return new BPromise(function(_0x356c41,_0x1c3ce7){return client['request'](_0x4ef613,_0x3327be)['then'](function(_0x1066bb){logger['info'](_0xbcc6('0xd'),_0xa293ac,_0xbcc6('0xe'));logger[_0xbcc6('0xf')](_0xbcc6('0x10'),_0xa293ac,_0xbcc6('0xe'),JSON[_0xbcc6('0x11')](_0x1066bb));if(_0x1066bb['error']){if(_0x1066bb[_0xbcc6('0x12')]['code']===0x1f4){logger[_0xbcc6('0x12')](_0xbcc6('0xd'),_0xa293ac,_0x1066bb[_0xbcc6('0x12')]['message']);return _0x1c3ce7(_0x1066bb[_0xbcc6('0x12')]['message']);}logger['error'](_0xbcc6('0xd'),_0xa293ac,_0x1066bb[_0xbcc6('0x12')][_0xbcc6('0x13')]);return _0x356c41(_0x1066bb[_0xbcc6('0x12')][_0xbcc6('0x13')]);}else{logger[_0xbcc6('0x14')](_0xbcc6('0xd'),_0xa293ac,_0xbcc6('0xe'));_0x356c41(_0x1066bb[_0xbcc6('0x15')][_0xbcc6('0x13')]);}})[_0xbcc6('0x16')](function(_0x2fa1be){logger['error']('AnalyticMetric,\x20%s,\x20%s',_0xa293ac,_0x2fa1be);_0x1c3ce7(_0x2fa1be);});});}
\ No newline at end of file
+var _0x0bd0=['../../mysqldb','../../config/utils','../../config/logger','../../config/environment','client','http','request','then','info','AnalyticMetric,\x20%s,\x20%s','debug','error','code','message','result','catch','lodash','moment','bluebird','randomstring','ioredis'];(function(_0x24920c,_0x1ba05a){var _0x3086cb=function(_0x33abd2){while(--_0x33abd2){_0x24920c['push'](_0x24920c['shift']());}};_0x3086cb(++_0x1ba05a);}(_0x0bd0,0x175));var _0x00bd=function(_0x2afb44,_0x249a57){_0x2afb44=_0x2afb44-0x0;var _0x15ccc2=_0x0bd0[_0x2afb44];return _0x15ccc2;};'use strict';var _=require(_0x00bd('0x0'));var util=require('util');var moment=require(_0x00bd('0x1'));var BPromise=require(_0x00bd('0x2'));var rs=require(_0x00bd('0x3'));var fs=require('fs');var Redis=require(_0x00bd('0x4'));var db=require(_0x00bd('0x5'))['db'];var utils=require(_0x00bd('0x6'));var logger=require(_0x00bd('0x7'))('rpc');var config=require(_0x00bd('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x00bd('0x9')][_0x00bd('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x24c723,_0x3d8c5c,_0x354cba){return new BPromise(function(_0x29c359,_0x17e7e7){return client[_0x00bd('0xb')](_0x24c723,_0x354cba)[_0x00bd('0xc')](function(_0x4e1b77){logger[_0x00bd('0xd')](_0x00bd('0xe'),_0x3d8c5c,'request\x20sent');logger[_0x00bd('0xf')]('AnalyticMetric,\x20%s,\x20%s,\x20%s',_0x3d8c5c,'request\x20sent',JSON['stringify'](_0x4e1b77));if(_0x4e1b77['error']){if(_0x4e1b77[_0x00bd('0x10')][_0x00bd('0x11')]===0x1f4){logger[_0x00bd('0x10')]('AnalyticMetric,\x20%s,\x20%s',_0x3d8c5c,_0x4e1b77[_0x00bd('0x10')][_0x00bd('0x12')]);return _0x17e7e7(_0x4e1b77[_0x00bd('0x10')][_0x00bd('0x12')]);}logger[_0x00bd('0x10')]('AnalyticMetric,\x20%s,\x20%s',_0x3d8c5c,_0x4e1b77[_0x00bd('0x10')]['message']);return _0x29c359(_0x4e1b77[_0x00bd('0x10')]['message']);}else{logger['info'](_0x00bd('0xe'),_0x3d8c5c,'request\x20sent');_0x29c359(_0x4e1b77[_0x00bd('0x13')][_0x00bd('0x12')]);}})[_0x00bd('0x14')](function(_0x4c73f5){logger[_0x00bd('0x10')](_0x00bd('0xe'),_0x3d8c5c,_0x4c73f5);_0x17e7e7(_0x4c73f5);});});}
\ No newline at end of file