Built motion from commit d13fb11b.|2.6.34
[motion2.git] / server / api / reportAgentPreview / reportAgentPreview.rpc.js
index 6e2cbf3..f336c67 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9f24=['catch','CreateReportAgentPreview','ReportAgentPreview','create','stringify','lodash','util','moment','bluebird','../../config/utils','../../config/logger','rpc','jayson/promise','client','request','then','info','ReportAgentPreview,\x20%s,\x20%s','request\x20sent','debug','code','error','message','result'];(function(_0x4a04de,_0x2e342c){var _0xbbe018=function(_0x39639c){while(--_0x39639c){_0x4a04de['push'](_0x4a04de['shift']());}};_0xbbe018(++_0x2e342c);}(_0x9f24,0x13d));var _0x49f2=function(_0x489b87,_0xd51c93){_0x489b87=_0x489b87-0x0;var _0x1823b6=_0x9f24[_0x489b87];return _0x1823b6;};'use strict';var _=require(_0x49f2('0x0'));var util=require(_0x49f2('0x1'));var moment=require(_0x49f2('0x2'));var BPromise=require(_0x49f2('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x49f2('0x4'));var logger=require(_0x49f2('0x5'))(_0x49f2('0x6'));var config=require('../../config/environment');var jayson=require(_0x49f2('0x7'));var client=jayson[_0x49f2('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x4c097d,_0x2871d7,_0x13ddf7){return new BPromise(function(_0x183275,_0x5fc678){return client[_0x49f2('0x9')](_0x4c097d,_0x13ddf7)[_0x49f2('0xa')](function(_0x48571f){logger[_0x49f2('0xb')](_0x49f2('0xc'),_0x2871d7,_0x49f2('0xd'));logger[_0x49f2('0xe')]('ReportAgentPreview,\x20%s,\x20%s,\x20%s',_0x2871d7,'request\x20sent',JSON['stringify'](_0x48571f));if(_0x48571f['error']){if(_0x48571f['error'][_0x49f2('0xf')]===0x1f4){logger['error'](_0x49f2('0xc'),_0x2871d7,_0x48571f[_0x49f2('0x10')][_0x49f2('0x11')]);return _0x5fc678(_0x48571f[_0x49f2('0x10')][_0x49f2('0x11')]);}logger[_0x49f2('0x10')](_0x49f2('0xc'),_0x2871d7,_0x48571f[_0x49f2('0x10')][_0x49f2('0x11')]);return _0x183275(_0x48571f[_0x49f2('0x10')]['message']);}else{logger[_0x49f2('0xb')](_0x49f2('0xc'),_0x2871d7,_0x49f2('0xd'));_0x183275(_0x48571f[_0x49f2('0x12')][_0x49f2('0x11')]);}})[_0x49f2('0x13')](function(_0xb12012){logger[_0x49f2('0x10')](_0x49f2('0xc'),_0x2871d7,_0xb12012);_0x5fc678(_0xb12012);});});}exports[_0x49f2('0x14')]=function(_0x3957b0){var _0x435b94=this;return new Promise(function(_0x2eb85d,_0x33b7c3){return db[_0x49f2('0x15')][_0x49f2('0x16')](_0x3957b0['body'],{'raw':_0x3957b0['options']?_0x3957b0['options']['raw']===undefined?!![]:![]:!![]})[_0x49f2('0xa')](function(_0x15034b){logger['info'](_0x49f2('0x14'),_0x3957b0);logger['debug'](_0x49f2('0x14'),_0x3957b0,JSON[_0x49f2('0x17')](_0x15034b));_0x2eb85d(_0x15034b);})[_0x49f2('0x13')](function(_0x2861ef){logger['error']('CreateReportAgentPreview',_0x2861ef[_0x49f2('0x11')],_0x3957b0);_0x33b7c3(_0x435b94[_0x49f2('0x10')](0x1f4,_0x2861ef[_0x49f2('0x11')]));});});};
\ No newline at end of file
+var _0x50bf=['util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','client','http','request','then','info','ReportAgentPreview,\x20%s,\x20%s','request\x20sent','debug','ReportAgentPreview,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','CreateReportAgentPreview','body','options','lodash'];(function(_0x232ec0,_0x45fdd0){var _0x356705=function(_0x4099ea){while(--_0x4099ea){_0x232ec0['push'](_0x232ec0['shift']());}};_0x356705(++_0x45fdd0);}(_0x50bf,0xd7));var _0xf50b=function(_0x573241,_0x53d481){_0x573241=_0x573241-0x0;var _0x32858a=_0x50bf[_0x573241];return _0x32858a;};'use strict';var _=require(_0xf50b('0x0'));var util=require(_0xf50b('0x1'));var moment=require(_0xf50b('0x2'));var BPromise=require(_0xf50b('0x3'));var rs=require(_0xf50b('0x4'));var fs=require('fs');var Redis=require(_0xf50b('0x5'));var db=require(_0xf50b('0x6'))['db'];var utils=require(_0xf50b('0x7'));var logger=require(_0xf50b('0x8'))('rpc');var config=require('../../config/environment');var jayson=require(_0xf50b('0x9'));var client=jayson[_0xf50b('0xa')][_0xf50b('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x5502ef,_0x53aa63,_0x239eee){return new BPromise(function(_0x2d108c,_0x1bc2bb){return client[_0xf50b('0xc')](_0x5502ef,_0x239eee)[_0xf50b('0xd')](function(_0x5ad41e){logger[_0xf50b('0xe')](_0xf50b('0xf'),_0x53aa63,_0xf50b('0x10'));logger[_0xf50b('0x11')](_0xf50b('0x12'),_0x53aa63,'request\x20sent',JSON[_0xf50b('0x13')](_0x5ad41e));if(_0x5ad41e['error']){if(_0x5ad41e[_0xf50b('0x14')]['code']===0x1f4){logger[_0xf50b('0x14')]('ReportAgentPreview,\x20%s,\x20%s',_0x53aa63,_0x5ad41e[_0xf50b('0x14')][_0xf50b('0x15')]);return _0x1bc2bb(_0x5ad41e[_0xf50b('0x14')]['message']);}logger[_0xf50b('0x14')]('ReportAgentPreview,\x20%s,\x20%s',_0x53aa63,_0x5ad41e[_0xf50b('0x14')][_0xf50b('0x15')]);return _0x2d108c(_0x5ad41e[_0xf50b('0x14')][_0xf50b('0x15')]);}else{logger['info'](_0xf50b('0xf'),_0x53aa63,'request\x20sent');_0x2d108c(_0x5ad41e[_0xf50b('0x16')]['message']);}})[_0xf50b('0x17')](function(_0x2e3568){logger[_0xf50b('0x14')](_0xf50b('0xf'),_0x53aa63,_0x2e3568);_0x1bc2bb(_0x2e3568);});});}exports[_0xf50b('0x18')]=function(_0x2d3567){var _0x567704=this;return new Promise(function(_0x250810,_0x11d5de){return db['ReportAgentPreview']['create'](_0x2d3567[_0xf50b('0x19')],{'raw':_0x2d3567[_0xf50b('0x1a')]?_0x2d3567[_0xf50b('0x1a')]['raw']===undefined?!![]:![]:!![]})[_0xf50b('0xd')](function(_0x16ab6f){logger[_0xf50b('0xe')](_0xf50b('0x18'),_0x2d3567);logger['debug'](_0xf50b('0x18'),_0x2d3567,JSON['stringify'](_0x16ab6f));_0x250810(_0x16ab6f);})[_0xf50b('0x17')](function(_0x202552){logger['error'](_0xf50b('0x18'),_0x202552['message'],_0x2d3567);_0x11d5de(_0x567704[_0xf50b('0x14')](0x1f4,_0x202552[_0xf50b('0x15')]));});});};
\ No newline at end of file