Built motion from commit 449495f6.|2.6.27
[motion2.git] / server / api / analyticExtractedReport / analyticExtractedReport.rpc.js
index 8649011..94bee6f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbd0e=['http','request','AnalyticExtractedReport,\x20%s,\x20%s','request\x20sent','debug','AnalyticExtractedReport,\x20%s,\x20%s,\x20%s','error','code','message','info','result','catch','lodash','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client'];(function(_0x175a55,_0x4082fd){var _0x167adf=function(_0x18ef07){while(--_0x18ef07){_0x175a55['push'](_0x175a55['shift']());}};_0x167adf(++_0x4082fd);}(_0xbd0e,0xfe));var _0xebd0=function(_0x121328,_0x2c3815){_0x121328=_0x121328-0x0;var _0x28548a=_0xbd0e[_0x121328];return _0x28548a;};'use strict';var _=require(_0xebd0('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xebd0('0x1'));var rs=require(_0xebd0('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xebd0('0x3'))['db'];var utils=require(_0xebd0('0x4'));var logger=require(_0xebd0('0x5'))(_0xebd0('0x6'));var config=require(_0xebd0('0x7'));var jayson=require(_0xebd0('0x8'));var client=jayson[_0xebd0('0x9')][_0xebd0('0xa')]({'port':0x232a});function respondWithRpcPromise(_0xf59a1a,_0x119850,_0x221e06){return new BPromise(function(_0x16e79d,_0x237249){return client[_0xebd0('0xb')](_0xf59a1a,_0x221e06)['then'](function(_0x3800f3){logger['info'](_0xebd0('0xc'),_0x119850,_0xebd0('0xd'));logger[_0xebd0('0xe')](_0xebd0('0xf'),_0x119850,_0xebd0('0xd'),JSON['stringify'](_0x3800f3));if(_0x3800f3[_0xebd0('0x10')]){if(_0x3800f3[_0xebd0('0x10')][_0xebd0('0x11')]===0x1f4){logger[_0xebd0('0x10')]('AnalyticExtractedReport,\x20%s,\x20%s',_0x119850,_0x3800f3[_0xebd0('0x10')][_0xebd0('0x12')]);return _0x237249(_0x3800f3[_0xebd0('0x10')]['message']);}logger[_0xebd0('0x10')]('AnalyticExtractedReport,\x20%s,\x20%s',_0x119850,_0x3800f3['error'][_0xebd0('0x12')]);return _0x16e79d(_0x3800f3[_0xebd0('0x10')][_0xebd0('0x12')]);}else{logger[_0xebd0('0x13')](_0xebd0('0xc'),_0x119850,'request\x20sent');_0x16e79d(_0x3800f3[_0xebd0('0x14')]['message']);}})[_0xebd0('0x15')](function(_0x3c3185){logger[_0xebd0('0x10')](_0xebd0('0xc'),_0x119850,_0x3c3185);_0x237249(_0x3c3185);});});}
\ No newline at end of file
+var _0xef74=['AnalyticExtractedReport,\x20%s,\x20%s','request\x20sent','debug','AnalyticExtractedReport,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','lodash','util','moment','bluebird','ioredis','../../mysqldb','rpc','../../config/environment','jayson/promise','client','http','then','info'];(function(_0x4cec21,_0x3d6fb4){var _0x30f1ef=function(_0x544e28){while(--_0x544e28){_0x4cec21['push'](_0x4cec21['shift']());}};_0x30f1ef(++_0x3d6fb4);}(_0xef74,0x8d));var _0x4ef7=function(_0x40a825,_0x3bac79){_0x40a825=_0x40a825-0x0;var _0x273a54=_0xef74[_0x40a825];return _0x273a54;};'use strict';var _=require(_0x4ef7('0x0'));var util=require(_0x4ef7('0x1'));var moment=require(_0x4ef7('0x2'));var BPromise=require(_0x4ef7('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x4ef7('0x4'));var db=require(_0x4ef7('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x4ef7('0x6'));var config=require(_0x4ef7('0x7'));var jayson=require(_0x4ef7('0x8'));var client=jayson[_0x4ef7('0x9')][_0x4ef7('0xa')]({'port':0x232a});function respondWithRpcPromise(_0xbebde,_0x15626f,_0x39cdff){return new BPromise(function(_0x30a89a,_0x26dd95){return client['request'](_0xbebde,_0x39cdff)[_0x4ef7('0xb')](function(_0x3e1941){logger[_0x4ef7('0xc')](_0x4ef7('0xd'),_0x15626f,_0x4ef7('0xe'));logger[_0x4ef7('0xf')](_0x4ef7('0x10'),_0x15626f,'request\x20sent',JSON[_0x4ef7('0x11')](_0x3e1941));if(_0x3e1941[_0x4ef7('0x12')]){if(_0x3e1941[_0x4ef7('0x12')]['code']===0x1f4){logger['error']('AnalyticExtractedReport,\x20%s,\x20%s',_0x15626f,_0x3e1941[_0x4ef7('0x12')][_0x4ef7('0x13')]);return _0x26dd95(_0x3e1941['error'][_0x4ef7('0x13')]);}logger[_0x4ef7('0x12')]('AnalyticExtractedReport,\x20%s,\x20%s',_0x15626f,_0x3e1941[_0x4ef7('0x12')][_0x4ef7('0x13')]);return _0x30a89a(_0x3e1941['error']['message']);}else{logger[_0x4ef7('0xc')](_0x4ef7('0xd'),_0x15626f,_0x4ef7('0xe'));_0x30a89a(_0x3e1941[_0x4ef7('0x14')][_0x4ef7('0x13')]);}})[_0x4ef7('0x15')](function(_0x1f87f3){logger[_0x4ef7('0x12')](_0x4ef7('0xd'),_0x15626f,_0x1f87f3);_0x26dd95(_0x1f87f3);});});}
\ No newline at end of file