Built motion from commit (unavailable).|2.5.11
[motion2.git] / server / api / analyticDefaultReport / analyticDefaultReport.rpc.js
index b3fcc27..a94b64d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2116=['AnalyticDefaultReport,\x20%s,\x20%s','request\x20sent','debug','AnalyticDefaultReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then'];(function(_0x2087f8,_0x431471){var _0x4b6c44=function(_0x5806b7){while(--_0x5806b7){_0x2087f8['push'](_0x2087f8['shift']());}};_0x4b6c44(++_0x431471);}(_0x2116,0x67));var _0x6211=function(_0x2442dd,_0x269ded){_0x2442dd=_0x2442dd-0x0;var _0x9d4594=_0x2116[_0x2442dd];return _0x9d4594;};'use strict';var _=require('lodash');var util=require(_0x6211('0x0'));var moment=require('moment');var BPromise=require(_0x6211('0x1'));var rs=require(_0x6211('0x2'));var fs=require('fs');var Redis=require(_0x6211('0x3'));var db=require(_0x6211('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x6211('0x5'))(_0x6211('0x6'));var config=require(_0x6211('0x7'));var jayson=require(_0x6211('0x8'));var client=jayson['client'][_0x6211('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x57f7e7,_0x2355c7,_0x320562){return new BPromise(function(_0x365e65,_0x31914a){return client[_0x6211('0xa')](_0x57f7e7,_0x320562)[_0x6211('0xb')](function(_0x10bb82){logger['info'](_0x6211('0xc'),_0x2355c7,_0x6211('0xd'));logger[_0x6211('0xe')](_0x6211('0xf'),_0x2355c7,_0x6211('0xd'),JSON[_0x6211('0x10')](_0x10bb82));if(_0x10bb82[_0x6211('0x11')]){if(_0x10bb82['error'][_0x6211('0x12')]===0x1f4){logger['error'](_0x6211('0xc'),_0x2355c7,_0x10bb82[_0x6211('0x11')][_0x6211('0x13')]);return _0x31914a(_0x10bb82['error'][_0x6211('0x13')]);}logger[_0x6211('0x11')](_0x6211('0xc'),_0x2355c7,_0x10bb82['error']['message']);return _0x365e65(_0x10bb82[_0x6211('0x11')][_0x6211('0x13')]);}else{logger[_0x6211('0x14')](_0x6211('0xc'),_0x2355c7,_0x6211('0xd'));_0x365e65(_0x10bb82[_0x6211('0x15')][_0x6211('0x13')]);}})[_0x6211('0x16')](function(_0x5b64e9){logger[_0x6211('0x11')](_0x6211('0xc'),_0x2355c7,_0x5b64e9);_0x31914a(_0x5b64e9);});});}
\ No newline at end of file
+var _0x6146=['then','info','request\x20sent','debug','AnalyticDefaultReport,\x20%s,\x20%s,\x20%s','stringify','error','message','AnalyticDefaultReport,\x20%s,\x20%s','catch','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http'];(function(_0xeb3a3c,_0x1385db){var _0x206d22=function(_0x43494c){while(--_0x43494c){_0xeb3a3c['push'](_0xeb3a3c['shift']());}};_0x206d22(++_0x1385db);}(_0x6146,0xba));var _0x6614=function(_0x7815cd,_0x430226){_0x7815cd=_0x7815cd-0x0;var _0x3f47d5=_0x6146[_0x7815cd];return _0x3f47d5;};'use strict';var _=require(_0x6614('0x0'));var util=require('util');var moment=require(_0x6614('0x1'));var BPromise=require(_0x6614('0x2'));var rs=require(_0x6614('0x3'));var fs=require('fs');var Redis=require(_0x6614('0x4'));var db=require(_0x6614('0x5'))['db'];var utils=require(_0x6614('0x6'));var logger=require(_0x6614('0x7'))('rpc');var config=require(_0x6614('0x8'));var jayson=require(_0x6614('0x9'));var client=jayson[_0x6614('0xa')][_0x6614('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x3b158b,_0x2e84fa,_0x4116e4){return new BPromise(function(_0x209bdd,_0x9bf15){return client['request'](_0x3b158b,_0x4116e4)[_0x6614('0xc')](function(_0x267e1b){logger[_0x6614('0xd')]('AnalyticDefaultReport,\x20%s,\x20%s',_0x2e84fa,_0x6614('0xe'));logger[_0x6614('0xf')](_0x6614('0x10'),_0x2e84fa,_0x6614('0xe'),JSON[_0x6614('0x11')](_0x267e1b));if(_0x267e1b[_0x6614('0x12')]){if(_0x267e1b[_0x6614('0x12')]['code']===0x1f4){logger[_0x6614('0x12')]('AnalyticDefaultReport,\x20%s,\x20%s',_0x2e84fa,_0x267e1b[_0x6614('0x12')][_0x6614('0x13')]);return _0x9bf15(_0x267e1b[_0x6614('0x12')][_0x6614('0x13')]);}logger[_0x6614('0x12')](_0x6614('0x14'),_0x2e84fa,_0x267e1b[_0x6614('0x12')][_0x6614('0x13')]);return _0x209bdd(_0x267e1b[_0x6614('0x12')]['message']);}else{logger['info'](_0x6614('0x14'),_0x2e84fa,_0x6614('0xe'));_0x209bdd(_0x267e1b['result'][_0x6614('0x13')]);}})[_0x6614('0x15')](function(_0x3a0fee){logger['error'](_0x6614('0x14'),_0x2e84fa,_0x3a0fee);_0x9bf15(_0x3a0fee);});});}
\ No newline at end of file