Built motion from commit b0a9a629.|2.6.33
[motion2.git] / server / api / analyticMetric / analyticMetric.rpc.js
index 2f172da..c1538f4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb7f5=['code','message','result','catch','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','rpc','jayson/promise','client','info','AnalyticMetric,\x20%s,\x20%s','request\x20sent','debug','stringify','error'];(function(_0x1a6f76,_0x514bd4){var _0x484c93=function(_0x49975a){while(--_0x49975a){_0x1a6f76['push'](_0x1a6f76['shift']());}};_0x484c93(++_0x514bd4);}(_0xb7f5,0x10e));var _0x5b7f=function(_0x532224,_0x21fb5b){_0x532224=_0x532224-0x0;var _0x225ab4=_0xb7f5[_0x532224];return _0x225ab4;};'use strict';var _=require('lodash');var util=require(_0x5b7f('0x0'));var moment=require(_0x5b7f('0x1'));var BPromise=require(_0x5b7f('0x2'));var rs=require(_0x5b7f('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x5b7f('0x4'))['db'];var utils=require(_0x5b7f('0x5'));var logger=require('../../config/logger')(_0x5b7f('0x6'));var config=require('../../config/environment');var jayson=require(_0x5b7f('0x7'));var client=jayson[_0x5b7f('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x204806,_0x2fff66,_0x19c016){return new BPromise(function(_0x3c2feb,_0x5267c8){return client['request'](_0x204806,_0x19c016)['then'](function(_0x1b4c3a){logger[_0x5b7f('0x9')](_0x5b7f('0xa'),_0x2fff66,_0x5b7f('0xb'));logger[_0x5b7f('0xc')]('AnalyticMetric,\x20%s,\x20%s,\x20%s',_0x2fff66,_0x5b7f('0xb'),JSON[_0x5b7f('0xd')](_0x1b4c3a));if(_0x1b4c3a[_0x5b7f('0xe')]){if(_0x1b4c3a['error'][_0x5b7f('0xf')]===0x1f4){logger['error'](_0x5b7f('0xa'),_0x2fff66,_0x1b4c3a['error']['message']);return _0x5267c8(_0x1b4c3a[_0x5b7f('0xe')]['message']);}logger[_0x5b7f('0xe')]('AnalyticMetric,\x20%s,\x20%s',_0x2fff66,_0x1b4c3a['error']['message']);return _0x3c2feb(_0x1b4c3a[_0x5b7f('0xe')][_0x5b7f('0x10')]);}else{logger[_0x5b7f('0x9')]('AnalyticMetric,\x20%s,\x20%s',_0x2fff66,_0x5b7f('0xb'));_0x3c2feb(_0x1b4c3a[_0x5b7f('0x11')][_0x5b7f('0x10')]);}})[_0x5b7f('0x12')](function(_0x333450){logger[_0x5b7f('0xe')](_0x5b7f('0xa'),_0x2fff66,_0x333450);_0x5267c8(_0x333450);});});}
\ No newline at end of file
+var _0xa302=['code','AnalyticMetric,\x20%s,\x20%s','message','result','catch','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','http','request','then','info','request\x20sent','stringify','error'];(function(_0xfae23b,_0x2be4ba){var _0x200640=function(_0x4ae258){while(--_0x4ae258){_0xfae23b['push'](_0xfae23b['shift']());}};_0x200640(++_0x2be4ba);}(_0xa302,0x1e9));var _0x2a30=function(_0x57b54c,_0x54ce0d){_0x57b54c=_0x57b54c-0x0;var _0x59cc19=_0xa302[_0x57b54c];return _0x59cc19;};'use strict';var _=require(_0x2a30('0x0'));var util=require('util');var moment=require(_0x2a30('0x1'));var BPromise=require(_0x2a30('0x2'));var rs=require(_0x2a30('0x3'));var fs=require('fs');var Redis=require(_0x2a30('0x4'));var db=require(_0x2a30('0x5'))['db'];var utils=require(_0x2a30('0x6'));var logger=require(_0x2a30('0x7'))('rpc');var config=require(_0x2a30('0x8'));var jayson=require(_0x2a30('0x9'));var client=jayson['client'][_0x2a30('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x417ce9,_0x5811ff,_0x41b3dd){return new BPromise(function(_0x2086ae,_0x441b04){return client[_0x2a30('0xb')](_0x417ce9,_0x41b3dd)[_0x2a30('0xc')](function(_0x4398de){logger[_0x2a30('0xd')]('AnalyticMetric,\x20%s,\x20%s',_0x5811ff,_0x2a30('0xe'));logger['debug']('AnalyticMetric,\x20%s,\x20%s,\x20%s',_0x5811ff,_0x2a30('0xe'),JSON[_0x2a30('0xf')](_0x4398de));if(_0x4398de[_0x2a30('0x10')]){if(_0x4398de[_0x2a30('0x10')][_0x2a30('0x11')]===0x1f4){logger[_0x2a30('0x10')](_0x2a30('0x12'),_0x5811ff,_0x4398de['error'][_0x2a30('0x13')]);return _0x441b04(_0x4398de['error']['message']);}logger[_0x2a30('0x10')]('AnalyticMetric,\x20%s,\x20%s',_0x5811ff,_0x4398de[_0x2a30('0x10')][_0x2a30('0x13')]);return _0x2086ae(_0x4398de[_0x2a30('0x10')]['message']);}else{logger['info']('AnalyticMetric,\x20%s,\x20%s',_0x5811ff,'request\x20sent');_0x2086ae(_0x4398de[_0x2a30('0x14')]['message']);}})[_0x2a30('0x15')](function(_0x4456ad){logger[_0x2a30('0x10')](_0x2a30('0x12'),_0x5811ff,_0x4456ad);_0x441b04(_0x4456ad);});});}
\ No newline at end of file