Built motion from commit c738b9ac.|2.6.25
[motion2.git] / server / api / reportAgentPreview / reportAgentPreview.rpc.js
index a5ffa81..369d422 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x08f5=['error','code','message','result','catch','ReportAgentPreview','create','options','raw','then','CreateReportAgentPreview','lodash','util','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','client','http','request','info','ReportAgentPreview,\x20%s,\x20%s','debug','ReportAgentPreview,\x20%s,\x20%s,\x20%s','request\x20sent'];(function(_0x279d37,_0x14de3f){var _0x530173=function(_0x37fc79){while(--_0x37fc79){_0x279d37['push'](_0x279d37['shift']());}};_0x530173(++_0x14de3f);}(_0x08f5,0x119));var _0x508f=function(_0x574162,_0x2425ea){_0x574162=_0x574162-0x0;var _0x39c245=_0x08f5[_0x574162];return _0x39c245;};'use strict';var _=require(_0x508f('0x0'));var util=require(_0x508f('0x1'));var moment=require('moment');var BPromise=require(_0x508f('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x508f('0x3'));var db=require(_0x508f('0x4'))['db'];var utils=require(_0x508f('0x5'));var logger=require(_0x508f('0x6'))('rpc');var config=require('../../config/environment');var jayson=require(_0x508f('0x7'));var client=jayson[_0x508f('0x8')][_0x508f('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x6b8efe,_0x33f775,_0x86fb83){return new BPromise(function(_0x3300eb,_0x4aa4ac){return client[_0x508f('0xa')](_0x6b8efe,_0x86fb83)['then'](function(_0x3c9a2f){logger[_0x508f('0xb')](_0x508f('0xc'),_0x33f775,'request\x20sent');logger[_0x508f('0xd')](_0x508f('0xe'),_0x33f775,_0x508f('0xf'),JSON['stringify'](_0x3c9a2f));if(_0x3c9a2f[_0x508f('0x10')]){if(_0x3c9a2f[_0x508f('0x10')][_0x508f('0x11')]===0x1f4){logger[_0x508f('0x10')](_0x508f('0xc'),_0x33f775,_0x3c9a2f[_0x508f('0x10')][_0x508f('0x12')]);return _0x4aa4ac(_0x3c9a2f[_0x508f('0x10')][_0x508f('0x12')]);}logger['error'](_0x508f('0xc'),_0x33f775,_0x3c9a2f[_0x508f('0x10')][_0x508f('0x12')]);return _0x3300eb(_0x3c9a2f[_0x508f('0x10')][_0x508f('0x12')]);}else{logger[_0x508f('0xb')](_0x508f('0xc'),_0x33f775,'request\x20sent');_0x3300eb(_0x3c9a2f[_0x508f('0x13')][_0x508f('0x12')]);}})[_0x508f('0x14')](function(_0x415d4c){logger[_0x508f('0x10')](_0x508f('0xc'),_0x33f775,_0x415d4c);_0x4aa4ac(_0x415d4c);});});}exports['CreateReportAgentPreview']=function(_0x44fbf7){var _0x4b5ea0=this;return new Promise(function(_0x1f676e,_0x4fded2){return db[_0x508f('0x15')][_0x508f('0x16')](_0x44fbf7['body'],{'raw':_0x44fbf7['options']?_0x44fbf7[_0x508f('0x17')][_0x508f('0x18')]===undefined?!![]:![]:!![]})[_0x508f('0x19')](function(_0x25632d){logger[_0x508f('0xb')]('CreateReportAgentPreview',_0x44fbf7);logger[_0x508f('0xd')](_0x508f('0x1a'),_0x44fbf7,JSON['stringify'](_0x25632d));_0x1f676e(_0x25632d);})[_0x508f('0x14')](function(_0x54c4d6){logger[_0x508f('0x10')](_0x508f('0x1a'),_0x54c4d6[_0x508f('0x12')],_0x44fbf7);_0x4fded2(_0x4b5ea0['error'](0x1f4,_0x54c4d6[_0x508f('0x12')]));});});};
\ No newline at end of file
+var _0x2ac3=['info','debug','request\x20sent','stringify','error','code','ReportAgentPreview,\x20%s,\x20%s','message','result','catch','ReportAgentPreview','create','body','options','raw','CreateReportAgentPreview','lodash','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then'];(function(_0x589bab,_0x46a0bf){var _0x50c677=function(_0x1a71a7){while(--_0x1a71a7){_0x589bab['push'](_0x589bab['shift']());}};_0x50c677(++_0x46a0bf);}(_0x2ac3,0x198));var _0x32ac=function(_0x13d07a,_0x41efc3){_0x13d07a=_0x13d07a-0x0;var _0x5ee0ee=_0x2ac3[_0x13d07a];return _0x5ee0ee;};'use strict';var _=require(_0x32ac('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x32ac('0x1'));var rs=require(_0x32ac('0x2'));var fs=require('fs');var Redis=require(_0x32ac('0x3'));var db=require(_0x32ac('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x32ac('0x5'))(_0x32ac('0x6'));var config=require(_0x32ac('0x7'));var jayson=require(_0x32ac('0x8'));var client=jayson['client'][_0x32ac('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x5c4115,_0x404a2b,_0x4a09c5){return new BPromise(function(_0x34caf4,_0x26c9c9){return client[_0x32ac('0xa')](_0x5c4115,_0x4a09c5)[_0x32ac('0xb')](function(_0x1b5e25){logger[_0x32ac('0xc')]('ReportAgentPreview,\x20%s,\x20%s',_0x404a2b,'request\x20sent');logger[_0x32ac('0xd')]('ReportAgentPreview,\x20%s,\x20%s,\x20%s',_0x404a2b,_0x32ac('0xe'),JSON[_0x32ac('0xf')](_0x1b5e25));if(_0x1b5e25[_0x32ac('0x10')]){if(_0x1b5e25[_0x32ac('0x10')][_0x32ac('0x11')]===0x1f4){logger['error'](_0x32ac('0x12'),_0x404a2b,_0x1b5e25[_0x32ac('0x10')][_0x32ac('0x13')]);return _0x26c9c9(_0x1b5e25[_0x32ac('0x10')][_0x32ac('0x13')]);}logger[_0x32ac('0x10')](_0x32ac('0x12'),_0x404a2b,_0x1b5e25['error'][_0x32ac('0x13')]);return _0x34caf4(_0x1b5e25['error']['message']);}else{logger['info'](_0x32ac('0x12'),_0x404a2b,_0x32ac('0xe'));_0x34caf4(_0x1b5e25[_0x32ac('0x14')][_0x32ac('0x13')]);}})[_0x32ac('0x15')](function(_0x4d620e){logger[_0x32ac('0x10')](_0x32ac('0x12'),_0x404a2b,_0x4d620e);_0x26c9c9(_0x4d620e);});});}exports['CreateReportAgentPreview']=function(_0xd64f28){var _0x4724d9=this;return new Promise(function(_0x21a0ef,_0x5700f7){return db[_0x32ac('0x16')][_0x32ac('0x17')](_0xd64f28[_0x32ac('0x18')],{'raw':_0xd64f28[_0x32ac('0x19')]?_0xd64f28[_0x32ac('0x19')][_0x32ac('0x1a')]===undefined?!![]:![]:!![]})[_0x32ac('0xb')](function(_0x510fb4){logger['info']('CreateReportAgentPreview',_0xd64f28);logger[_0x32ac('0xd')](_0x32ac('0x1b'),_0xd64f28,JSON[_0x32ac('0xf')](_0x510fb4));_0x21a0ef(_0x510fb4);})[_0x32ac('0x15')](function(_0x3c0368){logger[_0x32ac('0x10')]('CreateReportAgentPreview',_0x3c0368['message'],_0xd64f28);_0x5700f7(_0x4724d9['error'](0x1f4,_0x3c0368[_0x32ac('0x13')]));});});};
\ No newline at end of file