Built motion from commit fe909640.|2.6.8
[motion2.git] / server / api / analyticMetric / analyticMetric.rpc.js
index ce4355e..f04dae3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x201f=['then','AnalyticMetric,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','lodash','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/environment','client','http','request'];(function(_0x1b2e34,_0x8d3ab5){var _0x13c2b9=function(_0x1d4bb3){while(--_0x1d4bb3){_0x1b2e34['push'](_0x1b2e34['shift']());}};_0x13c2b9(++_0x8d3ab5);}(_0x201f,0xda));var _0xf201=function(_0x32381e,_0x122f77){_0x32381e=_0x32381e-0x0;var _0x1617c8=_0x201f[_0x32381e];return _0x1617c8;};'use strict';var _=require(_0xf201('0x0'));var util=require('util');var moment=require(_0xf201('0x1'));var BPromise=require(_0xf201('0x2'));var rs=require(_0xf201('0x3'));var fs=require('fs');var Redis=require(_0xf201('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xf201('0x5'));var logger=require('../../config/logger')('rpc');var config=require(_0xf201('0x6'));var jayson=require('jayson/promise');var client=jayson[_0xf201('0x7')][_0xf201('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x42c351,_0x1198b2,_0x150386){return new BPromise(function(_0x1a5694,_0x400562){return client[_0xf201('0x9')](_0x42c351,_0x150386)[_0xf201('0xa')](function(_0x2a019f){logger['info'](_0xf201('0xb'),_0x1198b2,_0xf201('0xc'));logger[_0xf201('0xd')]('AnalyticMetric,\x20%s,\x20%s,\x20%s',_0x1198b2,'request\x20sent',JSON[_0xf201('0xe')](_0x2a019f));if(_0x2a019f['error']){if(_0x2a019f[_0xf201('0xf')][_0xf201('0x10')]===0x1f4){logger[_0xf201('0xf')]('AnalyticMetric,\x20%s,\x20%s',_0x1198b2,_0x2a019f[_0xf201('0xf')][_0xf201('0x11')]);return _0x400562(_0x2a019f[_0xf201('0xf')][_0xf201('0x11')]);}logger[_0xf201('0xf')](_0xf201('0xb'),_0x1198b2,_0x2a019f[_0xf201('0xf')][_0xf201('0x11')]);return _0x1a5694(_0x2a019f[_0xf201('0xf')][_0xf201('0x11')]);}else{logger['info'](_0xf201('0xb'),_0x1198b2,_0xf201('0xc'));_0x1a5694(_0x2a019f[_0xf201('0x12')][_0xf201('0x11')]);}})['catch'](function(_0x259677){logger['error'](_0xf201('0xb'),_0x1198b2,_0x259677);_0x400562(_0x259677);});});}
\ No newline at end of file
+var _0x7362=['jayson/promise','client','http','request','then','info','AnalyticMetric,\x20%s,\x20%s','debug','request\x20sent','error','code','message','result','catch','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment'];(function(_0x564db9,_0x279e45){var _0x1c457e=function(_0x1c94d4){while(--_0x1c94d4){_0x564db9['push'](_0x564db9['shift']());}};_0x1c457e(++_0x279e45);}(_0x7362,0x1da));var _0x2736=function(_0x4f3d72,_0x1239a9){_0x4f3d72=_0x4f3d72-0x0;var _0x420f13=_0x7362[_0x4f3d72];return _0x420f13;};'use strict';var _=require('lodash');var util=require(_0x2736('0x0'));var moment=require(_0x2736('0x1'));var BPromise=require('bluebird');var rs=require(_0x2736('0x2'));var fs=require('fs');var Redis=require(_0x2736('0x3'));var db=require(_0x2736('0x4'))['db'];var utils=require(_0x2736('0x5'));var logger=require(_0x2736('0x6'))(_0x2736('0x7'));var config=require(_0x2736('0x8'));var jayson=require(_0x2736('0x9'));var client=jayson[_0x2736('0xa')][_0x2736('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x263fd4,_0x5999f6,_0x234451){return new BPromise(function(_0x277cf2,_0x32de56){return client[_0x2736('0xc')](_0x263fd4,_0x234451)[_0x2736('0xd')](function(_0x3c71ac){logger[_0x2736('0xe')](_0x2736('0xf'),_0x5999f6,'request\x20sent');logger[_0x2736('0x10')]('AnalyticMetric,\x20%s,\x20%s,\x20%s',_0x5999f6,_0x2736('0x11'),JSON['stringify'](_0x3c71ac));if(_0x3c71ac[_0x2736('0x12')]){if(_0x3c71ac['error'][_0x2736('0x13')]===0x1f4){logger['error'](_0x2736('0xf'),_0x5999f6,_0x3c71ac[_0x2736('0x12')][_0x2736('0x14')]);return _0x32de56(_0x3c71ac['error'][_0x2736('0x14')]);}logger[_0x2736('0x12')]('AnalyticMetric,\x20%s,\x20%s',_0x5999f6,_0x3c71ac[_0x2736('0x12')][_0x2736('0x14')]);return _0x277cf2(_0x3c71ac[_0x2736('0x12')]['message']);}else{logger[_0x2736('0xe')]('AnalyticMetric,\x20%s,\x20%s',_0x5999f6,'request\x20sent');_0x277cf2(_0x3c71ac[_0x2736('0x15')]['message']);}})[_0x2736('0x16')](function(_0x15c140){logger[_0x2736('0x12')](_0x2736('0xf'),_0x5999f6,_0x15c140);_0x32de56(_0x15c140);});});}
\ No newline at end of file