Built motion from commit fe909640.|2.6.8
[motion2.git] / server / api / analyticMetric / analyticMetric.rpc.js
index 9168594..f04dae3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x82f4=['lodash','moment','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','request','info','AnalyticMetric,\x20%s,\x20%s','debug','AnalyticMetric,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch'];(function(_0x10d6c5,_0x3aa2c1){var _0x525b0f=function(_0x2d51fe){while(--_0x2d51fe){_0x10d6c5['push'](_0x10d6c5['shift']());}};_0x525b0f(++_0x3aa2c1);}(_0x82f4,0x9a));var _0x482f=function(_0x4be82b,_0x3dc3cc){_0x4be82b=_0x4be82b-0x0;var _0x179c69=_0x82f4[_0x4be82b];return _0x179c69;};'use strict';var _=require(_0x482f('0x0'));var util=require('util');var moment=require(_0x482f('0x1'));var BPromise=require('bluebird');var rs=require(_0x482f('0x2'));var fs=require('fs');var Redis=require(_0x482f('0x3'));var db=require(_0x482f('0x4'))['db'];var utils=require(_0x482f('0x5'));var logger=require('../../config/logger')(_0x482f('0x6'));var config=require(_0x482f('0x7'));var jayson=require(_0x482f('0x8'));var client=jayson[_0x482f('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x51c3c3,_0x36a75b,_0x2420a4){return new BPromise(function(_0x567060,_0x18e09a){return client[_0x482f('0xa')](_0x51c3c3,_0x2420a4)['then'](function(_0x52f8c2){logger[_0x482f('0xb')](_0x482f('0xc'),_0x36a75b,'request\x20sent');logger[_0x482f('0xd')](_0x482f('0xe'),_0x36a75b,_0x482f('0xf'),JSON[_0x482f('0x10')](_0x52f8c2));if(_0x52f8c2[_0x482f('0x11')]){if(_0x52f8c2[_0x482f('0x11')][_0x482f('0x12')]===0x1f4){logger[_0x482f('0x11')]('AnalyticMetric,\x20%s,\x20%s',_0x36a75b,_0x52f8c2[_0x482f('0x11')][_0x482f('0x13')]);return _0x18e09a(_0x52f8c2['error'][_0x482f('0x13')]);}logger['error'](_0x482f('0xc'),_0x36a75b,_0x52f8c2[_0x482f('0x11')][_0x482f('0x13')]);return _0x567060(_0x52f8c2[_0x482f('0x11')]['message']);}else{logger[_0x482f('0xb')](_0x482f('0xc'),_0x36a75b,_0x482f('0xf'));_0x567060(_0x52f8c2[_0x482f('0x14')][_0x482f('0x13')]);}})[_0x482f('0x15')](function(_0x2b5423){logger[_0x482f('0x11')](_0x482f('0xc'),_0x36a75b,_0x2b5423);_0x18e09a(_0x2b5423);});});}
\ 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