Built motion from commit 52c8a02d.|2.6.29
[motion2.git] / server / api / analyticMetric / analyticMetric.rpc.js
index f3850a2..0572be6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe87d=['stringify','error','message','info','result','catch','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','http','then','AnalyticMetric,\x20%s,\x20%s','debug','AnalyticMetric,\x20%s,\x20%s,\x20%s','request\x20sent'];(function(_0x55e08b,_0x421620){var _0xd1a7ff=function(_0x58c7ff){while(--_0x58c7ff){_0x55e08b['push'](_0x55e08b['shift']());}};_0xd1a7ff(++_0x421620);}(_0xe87d,0x182));var _0xde87=function(_0x2335c5,_0x2734b4){_0x2335c5=_0x2335c5-0x0;var _0x1e7618=_0xe87d[_0x2335c5];return _0x1e7618;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0xde87('0x0'));var BPromise=require(_0xde87('0x1'));var rs=require(_0xde87('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xde87('0x3'))['db'];var utils=require(_0xde87('0x4'));var logger=require(_0xde87('0x5'))('rpc');var config=require(_0xde87('0x6'));var jayson=require(_0xde87('0x7'));var client=jayson['client'][_0xde87('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x123aa2,_0x1d1dc6,_0x201af9){return new BPromise(function(_0xa418ac,_0x4e6533){return client['request'](_0x123aa2,_0x201af9)[_0xde87('0x9')](function(_0x4b5b97){logger['info'](_0xde87('0xa'),_0x1d1dc6,'request\x20sent');logger[_0xde87('0xb')](_0xde87('0xc'),_0x1d1dc6,_0xde87('0xd'),JSON[_0xde87('0xe')](_0x4b5b97));if(_0x4b5b97['error']){if(_0x4b5b97['error']['code']===0x1f4){logger['error'](_0xde87('0xa'),_0x1d1dc6,_0x4b5b97[_0xde87('0xf')][_0xde87('0x10')]);return _0x4e6533(_0x4b5b97[_0xde87('0xf')]['message']);}logger[_0xde87('0xf')]('AnalyticMetric,\x20%s,\x20%s',_0x1d1dc6,_0x4b5b97['error'][_0xde87('0x10')]);return _0xa418ac(_0x4b5b97[_0xde87('0xf')][_0xde87('0x10')]);}else{logger[_0xde87('0x11')]('AnalyticMetric,\x20%s,\x20%s',_0x1d1dc6,_0xde87('0xd'));_0xa418ac(_0x4b5b97[_0xde87('0x12')][_0xde87('0x10')]);}})[_0xde87('0x13')](function(_0x345aca){logger[_0xde87('0xf')](_0xde87('0xa'),_0x1d1dc6,_0x345aca);_0x4e6533(_0x345aca);});});}
\ No newline at end of file
+var _0xe93f=['client','http','request','then','AnalyticMetric,\x20%s,\x20%s','debug','AnalyticMetric,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','info','result','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise'];(function(_0x1dbaee,_0x433c30){var _0x55b745=function(_0x201a2b){while(--_0x201a2b){_0x1dbaee['push'](_0x1dbaee['shift']());}};_0x55b745(++_0x433c30);}(_0xe93f,0x1cf));var _0xfe93=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xe93f[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0xfe93('0x0'));var util=require(_0xfe93('0x1'));var moment=require(_0xfe93('0x2'));var BPromise=require(_0xfe93('0x3'));var rs=require(_0xfe93('0x4'));var fs=require('fs');var Redis=require(_0xfe93('0x5'));var db=require(_0xfe93('0x6'))['db'];var utils=require(_0xfe93('0x7'));var logger=require(_0xfe93('0x8'))(_0xfe93('0x9'));var config=require(_0xfe93('0xa'));var jayson=require(_0xfe93('0xb'));var client=jayson[_0xfe93('0xc')][_0xfe93('0xd')]({'port':0x232a});function respondWithRpcPromise(_0x289992,_0x4bd020,_0x2c6981){return new BPromise(function(_0x40411c,_0x53cca5){return client[_0xfe93('0xe')](_0x289992,_0x2c6981)[_0xfe93('0xf')](function(_0x5c874d){logger['info'](_0xfe93('0x10'),_0x4bd020,'request\x20sent');logger[_0xfe93('0x11')](_0xfe93('0x12'),_0x4bd020,_0xfe93('0x13'),JSON[_0xfe93('0x14')](_0x5c874d));if(_0x5c874d[_0xfe93('0x15')]){if(_0x5c874d[_0xfe93('0x15')]['code']===0x1f4){logger[_0xfe93('0x15')](_0xfe93('0x10'),_0x4bd020,_0x5c874d[_0xfe93('0x15')]['message']);return _0x53cca5(_0x5c874d[_0xfe93('0x15')][_0xfe93('0x16')]);}logger[_0xfe93('0x15')]('AnalyticMetric,\x20%s,\x20%s',_0x4bd020,_0x5c874d[_0xfe93('0x15')]['message']);return _0x40411c(_0x5c874d['error'][_0xfe93('0x16')]);}else{logger[_0xfe93('0x17')](_0xfe93('0x10'),_0x4bd020,_0xfe93('0x13'));_0x40411c(_0x5c874d[_0xfe93('0x18')]['message']);}})['catch'](function(_0x16c427){logger[_0xfe93('0x15')](_0xfe93('0x10'),_0x4bd020,_0x16c427);_0x53cca5(_0x16c427);});});}
\ No newline at end of file