Built motion from commit 953226e6.|2.6.32
[motion2.git] / server / api / jscriptyAnswerReport / jscriptyAnswerReport.rpc.js
index d49ef5d..66be3a2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa1d0=['result','catch','util','bluebird','randomstring','ioredis','../../config/utils','client','http','request','then','info','debug','JscriptyAnswerReport,\x20%s,\x20%s,\x20%s','error','code','JscriptyAnswerReport,\x20%s,\x20%s','message','request\x20sent'];(function(_0x57989d,_0xee3e5){var _0x15b7fc=function(_0x181aca){while(--_0x181aca){_0x57989d['push'](_0x57989d['shift']());}};_0x15b7fc(++_0xee3e5);}(_0xa1d0,0x17e));var _0x0a1d=function(_0x22c977,_0x1c6c15){_0x22c977=_0x22c977-0x0;var _0x58b1bc=_0xa1d0[_0x22c977];return _0x58b1bc;};'use strict';var _=require('lodash');var util=require(_0x0a1d('0x0'));var moment=require('moment');var BPromise=require(_0x0a1d('0x1'));var rs=require(_0x0a1d('0x2'));var fs=require('fs');var Redis=require(_0x0a1d('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x0a1d('0x4'));var logger=require('../../config/logger')('rpc');var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x0a1d('0x5')][_0x0a1d('0x6')]({'port':0x232a});function respondWithRpcPromise(_0x834283,_0x18ef3e,_0x50f836){return new BPromise(function(_0x17f5fe,_0x41011c){return client[_0x0a1d('0x7')](_0x834283,_0x50f836)[_0x0a1d('0x8')](function(_0x5cc05b){logger[_0x0a1d('0x9')]('JscriptyAnswerReport,\x20%s,\x20%s',_0x18ef3e,'request\x20sent');logger[_0x0a1d('0xa')](_0x0a1d('0xb'),_0x18ef3e,'request\x20sent',JSON['stringify'](_0x5cc05b));if(_0x5cc05b[_0x0a1d('0xc')]){if(_0x5cc05b['error'][_0x0a1d('0xd')]===0x1f4){logger[_0x0a1d('0xc')](_0x0a1d('0xe'),_0x18ef3e,_0x5cc05b['error'][_0x0a1d('0xf')]);return _0x41011c(_0x5cc05b[_0x0a1d('0xc')]['message']);}logger[_0x0a1d('0xc')](_0x0a1d('0xe'),_0x18ef3e,_0x5cc05b[_0x0a1d('0xc')][_0x0a1d('0xf')]);return _0x17f5fe(_0x5cc05b[_0x0a1d('0xc')]['message']);}else{logger['info'](_0x0a1d('0xe'),_0x18ef3e,_0x0a1d('0x10'));_0x17f5fe(_0x5cc05b[_0x0a1d('0x11')][_0x0a1d('0xf')]);}})[_0x0a1d('0x12')](function(_0x3a238f){logger['error'](_0x0a1d('0xe'),_0x18ef3e,_0x3a238f);_0x41011c(_0x3a238f);});});}
\ No newline at end of file
+var _0x8eb3=['debug','stringify','error','message','request\x20sent','result','lodash','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','info','JscriptyAnswerReport,\x20%s,\x20%s'];(function(_0x19e35c,_0x29cd1e){var _0x3e1fe8=function(_0x17258b){while(--_0x17258b){_0x19e35c['push'](_0x19e35c['shift']());}};_0x3e1fe8(++_0x29cd1e);}(_0x8eb3,0x8b));var _0x38eb=function(_0x5e5754,_0x270c8b){_0x5e5754=_0x5e5754-0x0;var _0x3779f1=_0x8eb3[_0x5e5754];return _0x3779f1;};'use strict';var _=require(_0x38eb('0x0'));var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x38eb('0x1'));var fs=require('fs');var Redis=require(_0x38eb('0x2'));var db=require(_0x38eb('0x3'))['db'];var utils=require(_0x38eb('0x4'));var logger=require('../../config/logger')(_0x38eb('0x5'));var config=require(_0x38eb('0x6'));var jayson=require(_0x38eb('0x7'));var client=jayson[_0x38eb('0x8')][_0x38eb('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x496ec6,_0x195fdf,_0x360c94){return new BPromise(function(_0x19f16f,_0x355fa7){return client[_0x38eb('0xa')](_0x496ec6,_0x360c94)['then'](function(_0x5cc0df){logger[_0x38eb('0xb')](_0x38eb('0xc'),_0x195fdf,'request\x20sent');logger[_0x38eb('0xd')]('JscriptyAnswerReport,\x20%s,\x20%s,\x20%s',_0x195fdf,'request\x20sent',JSON[_0x38eb('0xe')](_0x5cc0df));if(_0x5cc0df[_0x38eb('0xf')]){if(_0x5cc0df[_0x38eb('0xf')]['code']===0x1f4){logger['error'](_0x38eb('0xc'),_0x195fdf,_0x5cc0df[_0x38eb('0xf')][_0x38eb('0x10')]);return _0x355fa7(_0x5cc0df['error'][_0x38eb('0x10')]);}logger['error']('JscriptyAnswerReport,\x20%s,\x20%s',_0x195fdf,_0x5cc0df[_0x38eb('0xf')][_0x38eb('0x10')]);return _0x19f16f(_0x5cc0df[_0x38eb('0xf')]['message']);}else{logger['info'](_0x38eb('0xc'),_0x195fdf,_0x38eb('0x11'));_0x19f16f(_0x5cc0df[_0x38eb('0x12')]['message']);}})['catch'](function(_0x3ecb8e){logger['error'](_0x38eb('0xc'),_0x195fdf,_0x3ecb8e);_0x355fa7(_0x3ecb8e);});});}
\ No newline at end of file