Built motion from commit 3c2ce842.|2.6.31
[motion2.git] / server / api / reportAgentPreview / reportAgentPreview.rpc.js
index 73044ad..ff55a11 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x41af=['body','info','CreateReportAgentPreview','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','then','ReportAgentPreview,\x20%s,\x20%s','request\x20sent','debug','ReportAgentPreview,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','create'];(function(_0x819464,_0x46fc91){var _0x49dcc0=function(_0x36b2b2){while(--_0x36b2b2){_0x819464['push'](_0x819464['shift']());}};_0x49dcc0(++_0x46fc91);}(_0x41af,0x147));var _0xf41a=function(_0x4c0277,_0x4e4ba5){_0x4c0277=_0x4c0277-0x0;var _0x5a84e7=_0x41af[_0x4c0277];return _0x5a84e7;};'use strict';var _=require(_0xf41a('0x0'));var util=require(_0xf41a('0x1'));var moment=require(_0xf41a('0x2'));var BPromise=require(_0xf41a('0x3'));var rs=require(_0xf41a('0x4'));var fs=require('fs');var Redis=require(_0xf41a('0x5'));var db=require(_0xf41a('0x6'))['db'];var utils=require(_0xf41a('0x7'));var logger=require(_0xf41a('0x8'))(_0xf41a('0x9'));var config=require(_0xf41a('0xa'));var jayson=require(_0xf41a('0xb'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x413cfe,_0x24f19c,_0x521bb7){return new BPromise(function(_0x268ea7,_0x300bee){return client['request'](_0x413cfe,_0x521bb7)[_0xf41a('0xc')](function(_0x3c3f2b){logger['info'](_0xf41a('0xd'),_0x24f19c,_0xf41a('0xe'));logger[_0xf41a('0xf')](_0xf41a('0x10'),_0x24f19c,_0xf41a('0xe'),JSON[_0xf41a('0x11')](_0x3c3f2b));if(_0x3c3f2b[_0xf41a('0x12')]){if(_0x3c3f2b[_0xf41a('0x12')][_0xf41a('0x13')]===0x1f4){logger['error'](_0xf41a('0xd'),_0x24f19c,_0x3c3f2b[_0xf41a('0x12')][_0xf41a('0x14')]);return _0x300bee(_0x3c3f2b['error'][_0xf41a('0x14')]);}logger[_0xf41a('0x12')](_0xf41a('0xd'),_0x24f19c,_0x3c3f2b['error'][_0xf41a('0x14')]);return _0x268ea7(_0x3c3f2b[_0xf41a('0x12')][_0xf41a('0x14')]);}else{logger['info']('ReportAgentPreview,\x20%s,\x20%s',_0x24f19c,_0xf41a('0xe'));_0x268ea7(_0x3c3f2b[_0xf41a('0x15')][_0xf41a('0x14')]);}})[_0xf41a('0x16')](function(_0x4bb8f9){logger['error'](_0xf41a('0xd'),_0x24f19c,_0x4bb8f9);_0x300bee(_0x4bb8f9);});});}exports['CreateReportAgentPreview']=function(_0x593e66){var _0x2ba776=this;return new Promise(function(_0x49e2f0,_0x4c4aa2){return db['ReportAgentPreview'][_0xf41a('0x17')](_0x593e66[_0xf41a('0x18')],{'raw':_0x593e66['options']?_0x593e66['options']['raw']===undefined?!![]:![]:!![]})[_0xf41a('0xc')](function(_0x24b519){logger[_0xf41a('0x19')](_0xf41a('0x1a'),_0x593e66);logger[_0xf41a('0xf')](_0xf41a('0x1a'),_0x593e66,JSON['stringify'](_0x24b519));_0x49e2f0(_0x24b519);})[_0xf41a('0x16')](function(_0x41b4d5){logger['error'](_0xf41a('0x1a'),_0x41b4d5[_0xf41a('0x14')],_0x593e66);_0x4c4aa2(_0x2ba776[_0xf41a('0x12')](0x1f4,_0x41b4d5[_0xf41a('0x14')]));});});};
\ No newline at end of file
+var _0x676a=['raw','CreateReportAgentPreview','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','jayson/promise','client','http','request','info','ReportAgentPreview,\x20%s,\x20%s','debug','request\x20sent','stringify','error','code','message','result','catch','ReportAgentPreview','options'];(function(_0x3d9287,_0x12b2f1){var _0x28e30d=function(_0xb18d29){while(--_0xb18d29){_0x3d9287['push'](_0x3d9287['shift']());}};_0x28e30d(++_0x12b2f1);}(_0x676a,0x1dd));var _0xa676=function(_0x4e1d03,_0x786f3a){_0x4e1d03=_0x4e1d03-0x0;var _0x362d4b=_0x676a[_0x4e1d03];return _0x362d4b;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0xa676('0x0'));var BPromise=require(_0xa676('0x1'));var rs=require(_0xa676('0x2'));var fs=require('fs');var Redis=require(_0xa676('0x3'));var db=require(_0xa676('0x4'))['db'];var utils=require(_0xa676('0x5'));var logger=require('../../config/logger')(_0xa676('0x6'));var config=require('../../config/environment');var jayson=require(_0xa676('0x7'));var client=jayson[_0xa676('0x8')][_0xa676('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x31e081,_0x21791c,_0x4375e0){return new BPromise(function(_0x513c5c,_0x1f5472){return client[_0xa676('0xa')](_0x31e081,_0x4375e0)['then'](function(_0x25412e){logger[_0xa676('0xb')](_0xa676('0xc'),_0x21791c,'request\x20sent');logger[_0xa676('0xd')]('ReportAgentPreview,\x20%s,\x20%s,\x20%s',_0x21791c,_0xa676('0xe'),JSON[_0xa676('0xf')](_0x25412e));if(_0x25412e[_0xa676('0x10')]){if(_0x25412e[_0xa676('0x10')][_0xa676('0x11')]===0x1f4){logger[_0xa676('0x10')](_0xa676('0xc'),_0x21791c,_0x25412e[_0xa676('0x10')][_0xa676('0x12')]);return _0x1f5472(_0x25412e[_0xa676('0x10')][_0xa676('0x12')]);}logger[_0xa676('0x10')](_0xa676('0xc'),_0x21791c,_0x25412e['error'][_0xa676('0x12')]);return _0x513c5c(_0x25412e[_0xa676('0x10')][_0xa676('0x12')]);}else{logger[_0xa676('0xb')](_0xa676('0xc'),_0x21791c,_0xa676('0xe'));_0x513c5c(_0x25412e[_0xa676('0x13')][_0xa676('0x12')]);}})[_0xa676('0x14')](function(_0x278692){logger['error']('ReportAgentPreview,\x20%s,\x20%s',_0x21791c,_0x278692);_0x1f5472(_0x278692);});});}exports['CreateReportAgentPreview']=function(_0x252d3a){var _0x3dc270=this;return new Promise(function(_0x553b3b,_0x2c22ce){return db[_0xa676('0x15')]['create'](_0x252d3a['body'],{'raw':_0x252d3a[_0xa676('0x16')]?_0x252d3a[_0xa676('0x16')][_0xa676('0x17')]===undefined?!![]:![]:!![]})['then'](function(_0x2b71ae){logger[_0xa676('0xb')](_0xa676('0x18'),_0x252d3a);logger[_0xa676('0xd')](_0xa676('0x18'),_0x252d3a,JSON[_0xa676('0xf')](_0x2b71ae));_0x553b3b(_0x2b71ae);})['catch'](function(_0x14120b){logger[_0xa676('0x10')](_0xa676('0x18'),_0x14120b[_0xa676('0x12')],_0x252d3a);_0x2c22ce(_0x3dc270[_0xa676('0x10')](0x1f4,_0x14120b[_0xa676('0x12')]));});});};
\ No newline at end of file