Built motion from commit c738b9ac.|2.6.25
[motion2.git] / server / api / analyticMetric / analyticMetric.rpc.js
index 2b2ee97..adc03bd 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1ed6=['debug','stringify','error','AnalyticMetric,\x20%s,\x20%s','message','result','catch','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','then','request\x20sent'];(function(_0x1e6c80,_0x3f5af7){var _0x3c3ec0=function(_0xdbdc23){while(--_0xdbdc23){_0x1e6c80['push'](_0x1e6c80['shift']());}};_0x3c3ec0(++_0x3f5af7);}(_0x1ed6,0x11f));var _0x61ed=function(_0x982771,_0x45cc34){_0x982771=_0x982771-0x0;var _0x40bcbf=_0x1ed6[_0x982771];return _0x40bcbf;};'use strict';var _=require(_0x61ed('0x0'));var util=require(_0x61ed('0x1'));var moment=require('moment');var BPromise=require(_0x61ed('0x2'));var rs=require(_0x61ed('0x3'));var fs=require('fs');var Redis=require(_0x61ed('0x4'));var db=require(_0x61ed('0x5'))['db'];var utils=require(_0x61ed('0x6'));var logger=require(_0x61ed('0x7'))('rpc');var config=require(_0x61ed('0x8'));var jayson=require(_0x61ed('0x9'));var client=jayson[_0x61ed('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0xaa171a,_0x4ebf15,_0x130754){return new BPromise(function(_0x869dbc,_0x3fffeb){return client['request'](_0xaa171a,_0x130754)[_0x61ed('0xb')](function(_0x4fe455){logger['info']('AnalyticMetric,\x20%s,\x20%s',_0x4ebf15,_0x61ed('0xc'));logger[_0x61ed('0xd')]('AnalyticMetric,\x20%s,\x20%s,\x20%s',_0x4ebf15,'request\x20sent',JSON[_0x61ed('0xe')](_0x4fe455));if(_0x4fe455[_0x61ed('0xf')]){if(_0x4fe455[_0x61ed('0xf')]['code']===0x1f4){logger[_0x61ed('0xf')](_0x61ed('0x10'),_0x4ebf15,_0x4fe455[_0x61ed('0xf')][_0x61ed('0x11')]);return _0x3fffeb(_0x4fe455['error'][_0x61ed('0x11')]);}logger['error']('AnalyticMetric,\x20%s,\x20%s',_0x4ebf15,_0x4fe455[_0x61ed('0xf')][_0x61ed('0x11')]);return _0x869dbc(_0x4fe455[_0x61ed('0xf')]['message']);}else{logger['info'](_0x61ed('0x10'),_0x4ebf15,_0x61ed('0xc'));_0x869dbc(_0x4fe455[_0x61ed('0x12')][_0x61ed('0x11')]);}})[_0x61ed('0x13')](function(_0x404f6d){logger[_0x61ed('0xf')](_0x61ed('0x10'),_0x4ebf15,_0x404f6d);_0x3fffeb(_0x404f6d);});});}
\ No newline at end of file
+var _0xfa0a=['then','info','AnalyticMetric,\x20%s,\x20%s','request\x20sent','debug','AnalyticMetric,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','util','moment','randomstring','ioredis','../../config/logger','rpc','../../config/environment','jayson/promise','client','request'];(function(_0x5f0631,_0x50c0ba){var _0x4323b3=function(_0x51de5e){while(--_0x51de5e){_0x5f0631['push'](_0x5f0631['shift']());}};_0x4323b3(++_0x50c0ba);}(_0xfa0a,0x9e));var _0xafa0=function(_0x497641,_0x5d4f64){_0x497641=_0x497641-0x0;var _0x3c355e=_0xfa0a[_0x497641];return _0x3c355e;};'use strict';var _=require('lodash');var util=require(_0xafa0('0x0'));var moment=require(_0xafa0('0x1'));var BPromise=require('bluebird');var rs=require(_0xafa0('0x2'));var fs=require('fs');var Redis=require(_0xafa0('0x3'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0xafa0('0x4'))(_0xafa0('0x5'));var config=require(_0xafa0('0x6'));var jayson=require(_0xafa0('0x7'));var client=jayson[_0xafa0('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x5df21f,_0x3bde30,_0x295958){return new BPromise(function(_0x47a3c3,_0x2fbc9e){return client[_0xafa0('0x9')](_0x5df21f,_0x295958)[_0xafa0('0xa')](function(_0x74125b){logger[_0xafa0('0xb')](_0xafa0('0xc'),_0x3bde30,_0xafa0('0xd'));logger[_0xafa0('0xe')](_0xafa0('0xf'),_0x3bde30,'request\x20sent',JSON[_0xafa0('0x10')](_0x74125b));if(_0x74125b[_0xafa0('0x11')]){if(_0x74125b[_0xafa0('0x11')][_0xafa0('0x12')]===0x1f4){logger[_0xafa0('0x11')](_0xafa0('0xc'),_0x3bde30,_0x74125b[_0xafa0('0x11')][_0xafa0('0x13')]);return _0x2fbc9e(_0x74125b[_0xafa0('0x11')][_0xafa0('0x13')]);}logger[_0xafa0('0x11')](_0xafa0('0xc'),_0x3bde30,_0x74125b[_0xafa0('0x11')][_0xafa0('0x13')]);return _0x47a3c3(_0x74125b[_0xafa0('0x11')][_0xafa0('0x13')]);}else{logger[_0xafa0('0xb')]('AnalyticMetric,\x20%s,\x20%s',_0x3bde30,'request\x20sent');_0x47a3c3(_0x74125b['result'][_0xafa0('0x13')]);}})[_0xafa0('0x14')](function(_0x2451f6){logger[_0xafa0('0x11')](_0xafa0('0xc'),_0x3bde30,_0x2451f6);_0x2fbc9e(_0x2451f6);});});}
\ No newline at end of file