Built motion from commit (unavailable).|2.5.31
[motion2.git] / server / api / analyticCustomReport / analyticCustomReport.rpc.js
index 9d11203..07fd25d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0f20=['AnalyticCustomReport,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','result','catch','util','randomstring','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','info'];(function(_0x44357e,_0x10a98f){var _0x168c48=function(_0x111eb8){while(--_0x111eb8){_0x44357e['push'](_0x44357e['shift']());}};_0x168c48(++_0x10a98f);}(_0x0f20,0x74));var _0x00f2=function(_0x36a7b4,_0x3194b5){_0x36a7b4=_0x36a7b4-0x0;var _0x240a19=_0x0f20[_0x36a7b4];return _0x240a19;};'use strict';var _=require('lodash');var util=require(_0x00f2('0x0'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x00f2('0x1'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x00f2('0x2'));var logger=require('../../config/logger')(_0x00f2('0x3'));var config=require(_0x00f2('0x4'));var jayson=require(_0x00f2('0x5'));var client=jayson[_0x00f2('0x6')][_0x00f2('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x147453,_0x25c7d6,_0x724f59){return new BPromise(function(_0x2b6bdf,_0x23935f){return client[_0x00f2('0x8')](_0x147453,_0x724f59)['then'](function(_0x115f81){logger[_0x00f2('0x9')](_0x00f2('0xa'),_0x25c7d6,_0x00f2('0xb'));logger[_0x00f2('0xc')]('AnalyticCustomReport,\x20%s,\x20%s,\x20%s',_0x25c7d6,_0x00f2('0xb'),JSON[_0x00f2('0xd')](_0x115f81));if(_0x115f81[_0x00f2('0xe')]){if(_0x115f81['error']['code']===0x1f4){logger['error']('AnalyticCustomReport,\x20%s,\x20%s',_0x25c7d6,_0x115f81[_0x00f2('0xe')][_0x00f2('0xf')]);return _0x23935f(_0x115f81[_0x00f2('0xe')][_0x00f2('0xf')]);}logger['error'](_0x00f2('0xa'),_0x25c7d6,_0x115f81['error'][_0x00f2('0xf')]);return _0x2b6bdf(_0x115f81[_0x00f2('0xe')]['message']);}else{logger[_0x00f2('0x9')](_0x00f2('0xa'),_0x25c7d6,_0x00f2('0xb'));_0x2b6bdf(_0x115f81[_0x00f2('0x10')][_0x00f2('0xf')]);}})[_0x00f2('0x11')](function(_0x1b6c2b){logger[_0x00f2('0xe')]('AnalyticCustomReport,\x20%s,\x20%s',_0x25c7d6,_0x1b6c2b);_0x23935f(_0x1b6c2b);});});}
\ No newline at end of file
+var _0x7672=['request\x20sent','error','code','message','result','catch','moment','ioredis','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','info','AnalyticCustomReport,\x20%s,\x20%s','debug','AnalyticCustomReport,\x20%s,\x20%s,\x20%s'];(function(_0x10d413,_0x284a3e){var _0x2661c4=function(_0x5cf827){while(--_0x5cf827){_0x10d413['push'](_0x10d413['shift']());}};_0x2661c4(++_0x284a3e);}(_0x7672,0x146));var _0x2767=function(_0xe40509,_0x13b167){_0xe40509=_0xe40509-0x0;var _0x3e5750=_0x7672[_0xe40509];return _0x3e5750;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x2767('0x0'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x2767('0x1'));var db=require('../../mysqldb')['db'];var utils=require(_0x2767('0x2'));var logger=require(_0x2767('0x3'))(_0x2767('0x4'));var config=require('../../config/environment');var jayson=require(_0x2767('0x5'));var client=jayson[_0x2767('0x6')][_0x2767('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x9ec4b9,_0x131a7a,_0x2890e3){return new BPromise(function(_0x2317b8,_0x5368fa){return client[_0x2767('0x8')](_0x9ec4b9,_0x2890e3)[_0x2767('0x9')](function(_0xaeacc0){logger[_0x2767('0xa')](_0x2767('0xb'),_0x131a7a,'request\x20sent');logger[_0x2767('0xc')](_0x2767('0xd'),_0x131a7a,_0x2767('0xe'),JSON['stringify'](_0xaeacc0));if(_0xaeacc0[_0x2767('0xf')]){if(_0xaeacc0[_0x2767('0xf')][_0x2767('0x10')]===0x1f4){logger['error'](_0x2767('0xb'),_0x131a7a,_0xaeacc0[_0x2767('0xf')][_0x2767('0x11')]);return _0x5368fa(_0xaeacc0[_0x2767('0xf')][_0x2767('0x11')]);}logger[_0x2767('0xf')]('AnalyticCustomReport,\x20%s,\x20%s',_0x131a7a,_0xaeacc0[_0x2767('0xf')]['message']);return _0x2317b8(_0xaeacc0['error'][_0x2767('0x11')]);}else{logger[_0x2767('0xa')](_0x2767('0xb'),_0x131a7a,_0x2767('0xe'));_0x2317b8(_0xaeacc0[_0x2767('0x12')][_0x2767('0x11')]);}})[_0x2767('0x13')](function(_0x1f075a){logger[_0x2767('0xf')](_0x2767('0xb'),_0x131a7a,_0x1f075a);_0x5368fa(_0x1f075a);});});}
\ No newline at end of file