Built motion from commit 953226e6.|2.6.32
[motion2.git] / server / api / jscriptyAnswerReport / jscriptyAnswerReport.rpc.js
index c838a05..66be3a2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6b39=['result','catch','lodash','util','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','JscriptyAnswerReport,\x20%s,\x20%s','request\x20sent','debug','JscriptyAnswerReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message'];(function(_0x366306,_0x485c8d){var _0x17d02c=function(_0x4882bf){while(--_0x4882bf){_0x366306['push'](_0x366306['shift']());}};_0x17d02c(++_0x485c8d);}(_0x6b39,0x66));var _0x96b3=function(_0x326c82,_0x34a08a){_0x326c82=_0x326c82-0x0;var _0x57e5f0=_0x6b39[_0x326c82];return _0x57e5f0;};'use strict';var _=require(_0x96b3('0x0'));var util=require(_0x96b3('0x1'));var moment=require('moment');var BPromise=require(_0x96b3('0x2'));var rs=require(_0x96b3('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x96b3('0x4'))['db'];var utils=require(_0x96b3('0x5'));var logger=require(_0x96b3('0x6'))(_0x96b3('0x7'));var config=require(_0x96b3('0x8'));var jayson=require(_0x96b3('0x9'));var client=jayson[_0x96b3('0xa')][_0x96b3('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x35427a,_0x1029a7,_0x52ff4f){return new BPromise(function(_0x44c25b,_0x32307f){return client[_0x96b3('0xc')](_0x35427a,_0x52ff4f)[_0x96b3('0xd')](function(_0x1edda8){logger[_0x96b3('0xe')](_0x96b3('0xf'),_0x1029a7,_0x96b3('0x10'));logger[_0x96b3('0x11')](_0x96b3('0x12'),_0x1029a7,'request\x20sent',JSON[_0x96b3('0x13')](_0x1edda8));if(_0x1edda8[_0x96b3('0x14')]){if(_0x1edda8[_0x96b3('0x14')][_0x96b3('0x15')]===0x1f4){logger[_0x96b3('0x14')](_0x96b3('0xf'),_0x1029a7,_0x1edda8[_0x96b3('0x14')][_0x96b3('0x16')]);return _0x32307f(_0x1edda8[_0x96b3('0x14')][_0x96b3('0x16')]);}logger[_0x96b3('0x14')](_0x96b3('0xf'),_0x1029a7,_0x1edda8[_0x96b3('0x14')][_0x96b3('0x16')]);return _0x44c25b(_0x1edda8[_0x96b3('0x14')][_0x96b3('0x16')]);}else{logger[_0x96b3('0xe')](_0x96b3('0xf'),_0x1029a7,_0x96b3('0x10'));_0x44c25b(_0x1edda8[_0x96b3('0x17')][_0x96b3('0x16')]);}})[_0x96b3('0x18')](function(_0x34235a){logger[_0x96b3('0x14')](_0x96b3('0xf'),_0x1029a7,_0x34235a);_0x32307f(_0x34235a);});});}
\ 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