Built motion from commit 953226e6.|2.6.32
[motion2.git] / server / api / analyticMetric / analyticMetric.rpc.js
index 1aa6b82..2f172da 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc2f0=['error','message','result','catch','lodash','util','bluebird','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','http','then','info','AnalyticMetric,\x20%s,\x20%s','request\x20sent','debug','AnalyticMetric,\x20%s,\x20%s,\x20%s','stringify'];(function(_0x1ed853,_0x1c21e9){var _0x3e76aa=function(_0x1d41ed){while(--_0x1d41ed){_0x1ed853['push'](_0x1ed853['shift']());}};_0x3e76aa(++_0x1c21e9);}(_0xc2f0,0x68));var _0x0c2f=function(_0x5aa5c4,_0x20d570){_0x5aa5c4=_0x5aa5c4-0x0;var _0x2d6e05=_0xc2f0[_0x5aa5c4];return _0x2d6e05;};'use strict';var _=require(_0x0c2f('0x0'));var util=require(_0x0c2f('0x1'));var moment=require('moment');var BPromise=require(_0x0c2f('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x0c2f('0x3'))['db'];var utils=require(_0x0c2f('0x4'));var logger=require('../../config/logger')(_0x0c2f('0x5'));var config=require(_0x0c2f('0x6'));var jayson=require(_0x0c2f('0x7'));var client=jayson['client'][_0x0c2f('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x366e2b,_0x4e291f,_0x2df7d8){return new BPromise(function(_0x5d0e93,_0xc6853c){return client['request'](_0x366e2b,_0x2df7d8)[_0x0c2f('0x9')](function(_0xb5e867){logger[_0x0c2f('0xa')](_0x0c2f('0xb'),_0x4e291f,_0x0c2f('0xc'));logger[_0x0c2f('0xd')](_0x0c2f('0xe'),_0x4e291f,_0x0c2f('0xc'),JSON[_0x0c2f('0xf')](_0xb5e867));if(_0xb5e867[_0x0c2f('0x10')]){if(_0xb5e867['error']['code']===0x1f4){logger['error'](_0x0c2f('0xb'),_0x4e291f,_0xb5e867[_0x0c2f('0x10')]['message']);return _0xc6853c(_0xb5e867[_0x0c2f('0x10')]['message']);}logger['error'](_0x0c2f('0xb'),_0x4e291f,_0xb5e867[_0x0c2f('0x10')][_0x0c2f('0x11')]);return _0x5d0e93(_0xb5e867[_0x0c2f('0x10')][_0x0c2f('0x11')]);}else{logger[_0x0c2f('0xa')](_0x0c2f('0xb'),_0x4e291f,'request\x20sent');_0x5d0e93(_0xb5e867[_0x0c2f('0x12')]['message']);}})[_0x0c2f('0x13')](function(_0xf30d9b){logger[_0x0c2f('0x10')](_0x0c2f('0xb'),_0x4e291f,_0xf30d9b);_0xc6853c(_0xf30d9b);});});}
\ No newline at end of file
+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