Built motion from commit 9e1399f3.|2.5.37
[motion2.git] / server / api / analyticMetric / analyticMetric.rpc.js
index 6827754..ce4355e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x38a4=['error','code','message','result','lodash','util','bluebird','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','AnalyticMetric,\x20%s,\x20%s','request\x20sent','AnalyticMetric,\x20%s,\x20%s,\x20%s'];(function(_0x27297f,_0x4983d3){var _0x297665=function(_0x14a77a){while(--_0x14a77a){_0x27297f['push'](_0x27297f['shift']());}};_0x297665(++_0x4983d3);}(_0x38a4,0x82));var _0x438a=function(_0x2f46f9,_0x46a26d){_0x2f46f9=_0x2f46f9-0x0;var _0x1fa811=_0x38a4[_0x2f46f9];return _0x1fa811;};'use strict';var _=require(_0x438a('0x0'));var util=require(_0x438a('0x1'));var moment=require('moment');var BPromise=require(_0x438a('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x438a('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x438a('0x4'));var logger=require(_0x438a('0x5'))(_0x438a('0x6'));var config=require(_0x438a('0x7'));var jayson=require(_0x438a('0x8'));var client=jayson[_0x438a('0x9')][_0x438a('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x30e4bb,_0x1f61f3,_0x3cb441){return new BPromise(function(_0x2e7c01,_0xc7de4b){return client[_0x438a('0xb')](_0x30e4bb,_0x3cb441)[_0x438a('0xc')](function(_0x52c7fb){logger[_0x438a('0xd')](_0x438a('0xe'),_0x1f61f3,_0x438a('0xf'));logger['debug'](_0x438a('0x10'),_0x1f61f3,'request\x20sent',JSON['stringify'](_0x52c7fb));if(_0x52c7fb['error']){if(_0x52c7fb[_0x438a('0x11')][_0x438a('0x12')]===0x1f4){logger[_0x438a('0x11')](_0x438a('0xe'),_0x1f61f3,_0x52c7fb[_0x438a('0x11')][_0x438a('0x13')]);return _0xc7de4b(_0x52c7fb[_0x438a('0x11')][_0x438a('0x13')]);}logger['error'](_0x438a('0xe'),_0x1f61f3,_0x52c7fb['error']['message']);return _0x2e7c01(_0x52c7fb[_0x438a('0x11')]['message']);}else{logger[_0x438a('0xd')](_0x438a('0xe'),_0x1f61f3,'request\x20sent');_0x2e7c01(_0x52c7fb[_0x438a('0x14')][_0x438a('0x13')]);}})['catch'](function(_0x4f29c6){logger[_0x438a('0x11')](_0x438a('0xe'),_0x1f61f3,_0x4f29c6);_0xc7de4b(_0x4f29c6);});});}
\ No newline at end of file
+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