Built motion from commit 3e059bc2.|2.5.32
[motion2.git] / server / api / analyticMetric / analyticMetric.rpc.js
index ed118e6..3002167 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x79f1=['util','moment','bluebird','randomstring','../../mysqldb','../../config/logger','rpc','../../config/environment','client','http','then','info','request\x20sent','debug','AnalyticMetric,\x20%s,\x20%s,\x20%s','stringify','error','message','AnalyticMetric,\x20%s,\x20%s','result','catch'];(function(_0x2ee186,_0x5173d4){var _0x2e72a9=function(_0x249b7f){while(--_0x249b7f){_0x2ee186['push'](_0x2ee186['shift']());}};_0x2e72a9(++_0x5173d4);}(_0x79f1,0x1e3));var _0x179f=function(_0x4da3b6,_0x233aff){_0x4da3b6=_0x4da3b6-0x0;var _0x574d38=_0x79f1[_0x4da3b6];return _0x574d38;};'use strict';var _=require('lodash');var util=require(_0x179f('0x0'));var moment=require(_0x179f('0x1'));var BPromise=require(_0x179f('0x2'));var rs=require(_0x179f('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x179f('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x179f('0x5'))(_0x179f('0x6'));var config=require(_0x179f('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x179f('0x8')][_0x179f('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x3fd366,_0xcd7c0d,_0x3eccf3){return new BPromise(function(_0x5e2a08,_0x2e9d86){return client['request'](_0x3fd366,_0x3eccf3)[_0x179f('0xa')](function(_0x5b8d12){logger[_0x179f('0xb')]('AnalyticMetric,\x20%s,\x20%s',_0xcd7c0d,_0x179f('0xc'));logger[_0x179f('0xd')](_0x179f('0xe'),_0xcd7c0d,'request\x20sent',JSON[_0x179f('0xf')](_0x5b8d12));if(_0x5b8d12[_0x179f('0x10')]){if(_0x5b8d12[_0x179f('0x10')]['code']===0x1f4){logger[_0x179f('0x10')]('AnalyticMetric,\x20%s,\x20%s',_0xcd7c0d,_0x5b8d12[_0x179f('0x10')]['message']);return _0x2e9d86(_0x5b8d12[_0x179f('0x10')]['message']);}logger['error']('AnalyticMetric,\x20%s,\x20%s',_0xcd7c0d,_0x5b8d12[_0x179f('0x10')][_0x179f('0x11')]);return _0x5e2a08(_0x5b8d12[_0x179f('0x10')][_0x179f('0x11')]);}else{logger[_0x179f('0xb')](_0x179f('0x12'),_0xcd7c0d,_0x179f('0xc'));_0x5e2a08(_0x5b8d12[_0x179f('0x13')][_0x179f('0x11')]);}})[_0x179f('0x14')](function(_0x51080e){logger[_0x179f('0x10')](_0x179f('0x12'),_0xcd7c0d,_0x51080e);_0x2e9d86(_0x51080e);});});}
\ No newline at end of file
+var _0x45fb=['request','then','info','AnalyticMetric,\x20%s,\x20%s','request\x20sent','debug','AnalyticMetric,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http'];(function(_0x3457b4,_0x4cd8f9){var _0xaa8fa9=function(_0x51897a){while(--_0x51897a){_0x3457b4['push'](_0x3457b4['shift']());}};_0xaa8fa9(++_0x4cd8f9);}(_0x45fb,0x15f));var _0xb45f=function(_0x2a3df4,_0x12b9a5){_0x2a3df4=_0x2a3df4-0x0;var _0x402f7d=_0x45fb[_0x2a3df4];return _0x402f7d;};'use strict';var _=require(_0xb45f('0x0'));var util=require('util');var moment=require(_0xb45f('0x1'));var BPromise=require(_0xb45f('0x2'));var rs=require(_0xb45f('0x3'));var fs=require('fs');var Redis=require(_0xb45f('0x4'));var db=require(_0xb45f('0x5'))['db'];var utils=require(_0xb45f('0x6'));var logger=require(_0xb45f('0x7'))(_0xb45f('0x8'));var config=require(_0xb45f('0x9'));var jayson=require(_0xb45f('0xa'));var client=jayson[_0xb45f('0xb')][_0xb45f('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x469398,_0x589930,_0x55749f){return new BPromise(function(_0x2b22e0,_0x50abe8){return client[_0xb45f('0xd')](_0x469398,_0x55749f)[_0xb45f('0xe')](function(_0x2d866a){logger[_0xb45f('0xf')](_0xb45f('0x10'),_0x589930,_0xb45f('0x11'));logger[_0xb45f('0x12')](_0xb45f('0x13'),_0x589930,_0xb45f('0x11'),JSON[_0xb45f('0x14')](_0x2d866a));if(_0x2d866a[_0xb45f('0x15')]){if(_0x2d866a[_0xb45f('0x15')][_0xb45f('0x16')]===0x1f4){logger['error'](_0xb45f('0x10'),_0x589930,_0x2d866a[_0xb45f('0x15')][_0xb45f('0x17')]);return _0x50abe8(_0x2d866a[_0xb45f('0x15')][_0xb45f('0x17')]);}logger[_0xb45f('0x15')](_0xb45f('0x10'),_0x589930,_0x2d866a[_0xb45f('0x15')]['message']);return _0x2b22e0(_0x2d866a[_0xb45f('0x15')][_0xb45f('0x17')]);}else{logger[_0xb45f('0xf')](_0xb45f('0x10'),_0x589930,'request\x20sent');_0x2b22e0(_0x2d866a[_0xb45f('0x18')]['message']);}})[_0xb45f('0x19')](function(_0x18776d){logger['error'](_0xb45f('0x10'),_0x589930,_0x18776d);_0x50abe8(_0x18776d);});});}
\ No newline at end of file