Built motion from commit (unavailable).|2.5.27
[motion2.git] / server / api / analyticMetric / analyticMetric.rpc.js
index 531b453..3fef17c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3520=['http','request','AnalyticMetric,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','lodash','util','bluebird','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise'];(function(_0x577b0a,_0x4a37f0){var _0x3ca84c=function(_0x52f668){while(--_0x52f668){_0x577b0a['push'](_0x577b0a['shift']());}};_0x3ca84c(++_0x4a37f0);}(_0x3520,0xab));var _0x0352=function(_0x4917ff,_0x109def){_0x4917ff=_0x4917ff-0x0;var _0xea19df=_0x3520[_0x4917ff];return _0xea19df;};'use strict';var _=require(_0x0352('0x0'));var util=require(_0x0352('0x1'));var moment=require('moment');var BPromise=require(_0x0352('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x0352('0x3'));var db=require(_0x0352('0x4'))['db'];var utils=require(_0x0352('0x5'));var logger=require('../../config/logger')(_0x0352('0x6'));var config=require(_0x0352('0x7'));var jayson=require(_0x0352('0x8'));var client=jayson['client'][_0x0352('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x43d1a8,_0xd4e200,_0x951594){return new BPromise(function(_0x411f70,_0x50831e){return client[_0x0352('0xa')](_0x43d1a8,_0x951594)['then'](function(_0x5a09e7){logger['info'](_0x0352('0xb'),_0xd4e200,_0x0352('0xc'));logger['debug']('AnalyticMetric,\x20%s,\x20%s,\x20%s',_0xd4e200,'request\x20sent',JSON[_0x0352('0xd')](_0x5a09e7));if(_0x5a09e7[_0x0352('0xe')]){if(_0x5a09e7[_0x0352('0xe')][_0x0352('0xf')]===0x1f4){logger['error']('AnalyticMetric,\x20%s,\x20%s',_0xd4e200,_0x5a09e7['error'][_0x0352('0x10')]);return _0x50831e(_0x5a09e7[_0x0352('0xe')]['message']);}logger[_0x0352('0xe')]('AnalyticMetric,\x20%s,\x20%s',_0xd4e200,_0x5a09e7['error'][_0x0352('0x10')]);return _0x411f70(_0x5a09e7[_0x0352('0xe')][_0x0352('0x10')]);}else{logger[_0x0352('0x11')](_0x0352('0xb'),_0xd4e200,_0x0352('0xc'));_0x411f70(_0x5a09e7['result']['message']);}})['catch'](function(_0x19e47d){logger[_0x0352('0xe')]('AnalyticMetric,\x20%s,\x20%s',_0xd4e200,_0x19e47d);_0x50831e(_0x19e47d);});});}
\ No newline at end of file
+var _0xf762=['lodash','util','moment','bluebird','randomstring','../../config/utils','../../config/logger','rpc','../../config/environment','http','then','info','AnalyticMetric,\x20%s,\x20%s','request\x20sent','AnalyticMetric,\x20%s,\x20%s,\x20%s','error','code','message','catch'];(function(_0x16337a,_0x4789a1){var _0x422365=function(_0x34f039){while(--_0x34f039){_0x16337a['push'](_0x16337a['shift']());}};_0x422365(++_0x4789a1);}(_0xf762,0x1a2));var _0x2f76=function(_0xdd7362,_0x2d8086){_0xdd7362=_0xdd7362-0x0;var _0x4a77b1=_0xf762[_0xdd7362];return _0x4a77b1;};'use strict';var _=require(_0x2f76('0x0'));var util=require(_0x2f76('0x1'));var moment=require(_0x2f76('0x2'));var BPromise=require(_0x2f76('0x3'));var rs=require(_0x2f76('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x2f76('0x5'));var logger=require(_0x2f76('0x6'))(_0x2f76('0x7'));var config=require(_0x2f76('0x8'));var jayson=require('jayson/promise');var client=jayson['client'][_0x2f76('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x5f4353,_0x17190b,_0x2bccbe){return new BPromise(function(_0x824ff5,_0x21bd6a){return client['request'](_0x5f4353,_0x2bccbe)[_0x2f76('0xa')](function(_0x378a90){logger[_0x2f76('0xb')](_0x2f76('0xc'),_0x17190b,_0x2f76('0xd'));logger['debug'](_0x2f76('0xe'),_0x17190b,_0x2f76('0xd'),JSON['stringify'](_0x378a90));if(_0x378a90[_0x2f76('0xf')]){if(_0x378a90[_0x2f76('0xf')][_0x2f76('0x10')]===0x1f4){logger['error'](_0x2f76('0xc'),_0x17190b,_0x378a90['error'][_0x2f76('0x11')]);return _0x21bd6a(_0x378a90[_0x2f76('0xf')]['message']);}logger[_0x2f76('0xf')](_0x2f76('0xc'),_0x17190b,_0x378a90['error'][_0x2f76('0x11')]);return _0x824ff5(_0x378a90[_0x2f76('0xf')][_0x2f76('0x11')]);}else{logger['info']('AnalyticMetric,\x20%s,\x20%s',_0x17190b,_0x2f76('0xd'));_0x824ff5(_0x378a90['result'][_0x2f76('0x11')]);}})[_0x2f76('0x12')](function(_0x31cee1){logger[_0x2f76('0xf')]('AnalyticMetric,\x20%s,\x20%s',_0x17190b,_0x31cee1);_0x21bd6a(_0x31cee1);});});}
\ No newline at end of file