Built motion from commit (unavailable).|2.5.29
[motion2.git] / server / api / userChatQueue / userChatQueue.rpc.js
index ca0113b..77af426 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6476=['UserChatQueue,\x20%s,\x20%s,\x20%s','stringify','error','message','info','result','catch','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','then','UserChatQueue,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x4e44d1,_0x15d7f6){var _0x527095=function(_0x43f17f){while(--_0x43f17f){_0x4e44d1['push'](_0x4e44d1['shift']());}};_0x527095(++_0x15d7f6);}(_0x6476,0xf9));var _0x6647=function(_0x54d4fe,_0x55e869){_0x54d4fe=_0x54d4fe-0x0;var _0x1ab5bb=_0x6476[_0x54d4fe];return _0x1ab5bb;};'use strict';var _=require('lodash');var util=require(_0x6647('0x0'));var moment=require(_0x6647('0x1'));var BPromise=require(_0x6647('0x2'));var rs=require(_0x6647('0x3'));var fs=require('fs');var Redis=require(_0x6647('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x6647('0x5'));var logger=require(_0x6647('0x6'))(_0x6647('0x7'));var config=require(_0x6647('0x8'));var jayson=require(_0x6647('0x9'));var client=jayson[_0x6647('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x587714,_0x141745,_0x4db61f){return new BPromise(function(_0x318a96,_0x31e3b3){return client['request'](_0x587714,_0x4db61f)[_0x6647('0xb')](function(_0x31d4bc){logger['info'](_0x6647('0xc'),_0x141745,_0x6647('0xd'));logger[_0x6647('0xe')](_0x6647('0xf'),_0x141745,_0x6647('0xd'),JSON[_0x6647('0x10')](_0x31d4bc));if(_0x31d4bc['error']){if(_0x31d4bc[_0x6647('0x11')]['code']===0x1f4){logger[_0x6647('0x11')](_0x6647('0xc'),_0x141745,_0x31d4bc['error'][_0x6647('0x12')]);return _0x31e3b3(_0x31d4bc[_0x6647('0x11')][_0x6647('0x12')]);}logger[_0x6647('0x11')]('UserChatQueue,\x20%s,\x20%s',_0x141745,_0x31d4bc['error'][_0x6647('0x12')]);return _0x318a96(_0x31d4bc[_0x6647('0x11')]['message']);}else{logger[_0x6647('0x13')]('UserChatQueue,\x20%s,\x20%s',_0x141745,'request\x20sent');_0x318a96(_0x31d4bc[_0x6647('0x14')][_0x6647('0x12')]);}})[_0x6647('0x15')](function(_0x782577){logger[_0x6647('0x11')](_0x6647('0xc'),_0x141745,_0x782577);_0x31e3b3(_0x782577);});});}
\ No newline at end of file
+var _0xf497=['../../config/utils','rpc','client','http','request','info','request\x20sent','debug','UserChatQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','UserChatQueue,\x20%s,\x20%s','message','result','util','bluebird','randomstring','ioredis','../../mysqldb'];(function(_0x33032e,_0x31411a){var _0x13316b=function(_0x2fb049){while(--_0x2fb049){_0x33032e['push'](_0x33032e['shift']());}};_0x13316b(++_0x31411a);}(_0xf497,0x18b));var _0x7f49=function(_0x160672,_0x570380){_0x160672=_0x160672-0x0;var _0x51fa43=_0xf497[_0x160672];return _0x51fa43;};'use strict';var _=require('lodash');var util=require(_0x7f49('0x0'));var moment=require('moment');var BPromise=require(_0x7f49('0x1'));var rs=require(_0x7f49('0x2'));var fs=require('fs');var Redis=require(_0x7f49('0x3'));var db=require(_0x7f49('0x4'))['db'];var utils=require(_0x7f49('0x5'));var logger=require('../../config/logger')(_0x7f49('0x6'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x7f49('0x7')][_0x7f49('0x8')]({'port':0x232a});function respondWithRpcPromise(_0xea03f2,_0x415e53,_0x5a12bc){return new BPromise(function(_0x436017,_0x44e4fc){return client[_0x7f49('0x9')](_0xea03f2,_0x5a12bc)['then'](function(_0x28c466){logger[_0x7f49('0xa')]('UserChatQueue,\x20%s,\x20%s',_0x415e53,_0x7f49('0xb'));logger[_0x7f49('0xc')](_0x7f49('0xd'),_0x415e53,'request\x20sent',JSON[_0x7f49('0xe')](_0x28c466));if(_0x28c466[_0x7f49('0xf')]){if(_0x28c466[_0x7f49('0xf')][_0x7f49('0x10')]===0x1f4){logger[_0x7f49('0xf')](_0x7f49('0x11'),_0x415e53,_0x28c466[_0x7f49('0xf')][_0x7f49('0x12')]);return _0x44e4fc(_0x28c466[_0x7f49('0xf')][_0x7f49('0x12')]);}logger[_0x7f49('0xf')](_0x7f49('0x11'),_0x415e53,_0x28c466[_0x7f49('0xf')][_0x7f49('0x12')]);return _0x436017(_0x28c466[_0x7f49('0xf')]['message']);}else{logger[_0x7f49('0xa')](_0x7f49('0x11'),_0x415e53,'request\x20sent');_0x436017(_0x28c466[_0x7f49('0x13')]['message']);}})['catch'](function(_0x31796d){logger[_0x7f49('0xf')](_0x7f49('0x11'),_0x415e53,_0x31796d);_0x44e4fc(_0x31796d);});});}
\ No newline at end of file