Built motion from commit ff78e754.|2.6.29
[motion2.git] / server / api / analyticCustomReport / analyticCustomReport.rpc.js
index 7cdc5dc..4974ec3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x492f=['ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','then','AnalyticCustomReport,\x20%s,\x20%s','debug','stringify','error','code','message','info','request\x20sent','result','lodash','moment'];(function(_0x4a747d,_0x3b747f){var _0x3a5b5c=function(_0x4b3e81){while(--_0x4b3e81){_0x4a747d['push'](_0x4a747d['shift']());}};_0x3a5b5c(++_0x3b747f);}(_0x492f,0x13e));var _0xf492=function(_0x4ae616,_0x3dac8){_0x4ae616=_0x4ae616-0x0;var _0x36bc6f=_0x492f[_0x4ae616];return _0x36bc6f;};'use strict';var _=require(_0xf492('0x0'));var util=require('util');var moment=require(_0xf492('0x1'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xf492('0x2'));var db=require(_0xf492('0x3'))['db'];var utils=require(_0xf492('0x4'));var logger=require(_0xf492('0x5'))('rpc');var config=require(_0xf492('0x6'));var jayson=require(_0xf492('0x7'));var client=jayson[_0xf492('0x8')][_0xf492('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x560019,_0xf500a2,_0x4e991a){return new BPromise(function(_0x711f96,_0x2d131d){return client['request'](_0x560019,_0x4e991a)[_0xf492('0xa')](function(_0x2150c8){logger['info'](_0xf492('0xb'),_0xf500a2,'request\x20sent');logger[_0xf492('0xc')]('AnalyticCustomReport,\x20%s,\x20%s,\x20%s',_0xf500a2,'request\x20sent',JSON[_0xf492('0xd')](_0x2150c8));if(_0x2150c8[_0xf492('0xe')]){if(_0x2150c8[_0xf492('0xe')][_0xf492('0xf')]===0x1f4){logger[_0xf492('0xe')](_0xf492('0xb'),_0xf500a2,_0x2150c8[_0xf492('0xe')]['message']);return _0x2d131d(_0x2150c8[_0xf492('0xe')]['message']);}logger[_0xf492('0xe')](_0xf492('0xb'),_0xf500a2,_0x2150c8['error'][_0xf492('0x10')]);return _0x711f96(_0x2150c8[_0xf492('0xe')][_0xf492('0x10')]);}else{logger[_0xf492('0x11')](_0xf492('0xb'),_0xf500a2,_0xf492('0x12'));_0x711f96(_0x2150c8[_0xf492('0x13')][_0xf492('0x10')]);}})['catch'](function(_0x24404f){logger['error']('AnalyticCustomReport,\x20%s,\x20%s',_0xf500a2,_0x24404f);_0x2d131d(_0x24404f);});});}
\ No newline at end of file
+var _0xb49a=['result','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','AnalyticCustomReport,\x20%s,\x20%s','request\x20sent','debug','AnalyticCustomReport,\x20%s,\x20%s,\x20%s','stringify','error','message','info'];(function(_0x4565bf,_0x5ad9d6){var _0x5610ba=function(_0x170988){while(--_0x170988){_0x4565bf['push'](_0x4565bf['shift']());}};_0x5610ba(++_0x5ad9d6);}(_0xb49a,0xf1));var _0xab49=function(_0x21e71a,_0xf0b818){_0x21e71a=_0x21e71a-0x0;var _0x174f46=_0xb49a[_0x21e71a];return _0x174f46;};'use strict';var _=require(_0xab49('0x0'));var util=require(_0xab49('0x1'));var moment=require(_0xab49('0x2'));var BPromise=require(_0xab49('0x3'));var rs=require(_0xab49('0x4'));var fs=require('fs');var Redis=require(_0xab49('0x5'));var db=require(_0xab49('0x6'))['db'];var utils=require(_0xab49('0x7'));var logger=require(_0xab49('0x8'))(_0xab49('0x9'));var config=require('../../config/environment');var jayson=require(_0xab49('0xa'));var client=jayson[_0xab49('0xb')][_0xab49('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x2c6a73,_0x1b1f40,_0x108dd1){return new BPromise(function(_0x58e5cc,_0x47f62d){return client[_0xab49('0xd')](_0x2c6a73,_0x108dd1)[_0xab49('0xe')](function(_0x2525d8){logger['info'](_0xab49('0xf'),_0x1b1f40,_0xab49('0x10'));logger[_0xab49('0x11')](_0xab49('0x12'),_0x1b1f40,_0xab49('0x10'),JSON[_0xab49('0x13')](_0x2525d8));if(_0x2525d8[_0xab49('0x14')]){if(_0x2525d8[_0xab49('0x14')]['code']===0x1f4){logger[_0xab49('0x14')](_0xab49('0xf'),_0x1b1f40,_0x2525d8[_0xab49('0x14')][_0xab49('0x15')]);return _0x47f62d(_0x2525d8['error'][_0xab49('0x15')]);}logger[_0xab49('0x14')](_0xab49('0xf'),_0x1b1f40,_0x2525d8[_0xab49('0x14')][_0xab49('0x15')]);return _0x58e5cc(_0x2525d8[_0xab49('0x14')]['message']);}else{logger[_0xab49('0x16')](_0xab49('0xf'),_0x1b1f40,_0xab49('0x10'));_0x58e5cc(_0x2525d8[_0xab49('0x17')]['message']);}})['catch'](function(_0x568bcb){logger[_0xab49('0x14')](_0xab49('0xf'),_0x1b1f40,_0x568bcb);_0x47f62d(_0x568bcb);});});}
\ No newline at end of file