Built motion from commit 3e059bc2.|2.5.32
[motion2.git] / server / api / userChatQueue / userChatQueue.rpc.js
index abaaf34..b50f58d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa340=['error','message','UserChatQueue,\x20%s,\x20%s','result','lodash','util','moment','randomstring','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','info','request\x20sent','stringify','code'];(function(_0x3edd51,_0x387ddd){var _0x451ffe=function(_0x55d2f4){while(--_0x55d2f4){_0x3edd51['push'](_0x3edd51['shift']());}};_0x451ffe(++_0x387ddd);}(_0xa340,0xcc));var _0x0a34=function(_0x1e7c47,_0x477935){_0x1e7c47=_0x1e7c47-0x0;var _0x4f2d50=_0xa340[_0x1e7c47];return _0x4f2d50;};'use strict';var _=require(_0x0a34('0x0'));var util=require(_0x0a34('0x1'));var moment=require(_0x0a34('0x2'));var BPromise=require('bluebird');var rs=require(_0x0a34('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x0a34('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x0a34('0x5'))(_0x0a34('0x6'));var config=require(_0x0a34('0x7'));var jayson=require(_0x0a34('0x8'));var client=jayson[_0x0a34('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x407718,_0x224f9b,_0x11be3c){return new BPromise(function(_0x549cc7,_0x1a30be){return client[_0x0a34('0xa')](_0x407718,_0x11be3c)[_0x0a34('0xb')](function(_0x42ab3d){logger[_0x0a34('0xc')]('UserChatQueue,\x20%s,\x20%s',_0x224f9b,_0x0a34('0xd'));logger['debug']('UserChatQueue,\x20%s,\x20%s,\x20%s',_0x224f9b,'request\x20sent',JSON[_0x0a34('0xe')](_0x42ab3d));if(_0x42ab3d['error']){if(_0x42ab3d['error'][_0x0a34('0xf')]===0x1f4){logger['error']('UserChatQueue,\x20%s,\x20%s',_0x224f9b,_0x42ab3d['error']['message']);return _0x1a30be(_0x42ab3d[_0x0a34('0x10')]['message']);}logger[_0x0a34('0x10')]('UserChatQueue,\x20%s,\x20%s',_0x224f9b,_0x42ab3d[_0x0a34('0x10')][_0x0a34('0x11')]);return _0x549cc7(_0x42ab3d['error'][_0x0a34('0x11')]);}else{logger[_0x0a34('0xc')](_0x0a34('0x12'),_0x224f9b,'request\x20sent');_0x549cc7(_0x42ab3d[_0x0a34('0x13')][_0x0a34('0x11')]);}})['catch'](function(_0x2336c0){logger[_0x0a34('0x10')](_0x0a34('0x12'),_0x224f9b,_0x2336c0);_0x1a30be(_0x2336c0);});});}
\ No newline at end of file
+var _0x51ca=['error','code','UserChatQueue,\x20%s,\x20%s','message','catch','util','bluebird','randomstring','ioredis','../../config/utils','rpc','jayson/promise','then','info','request\x20sent','debug','stringify'];(function(_0x3288da,_0x465b3b){var _0x58b5e7=function(_0x1aacd7){while(--_0x1aacd7){_0x3288da['push'](_0x3288da['shift']());}};_0x58b5e7(++_0x465b3b);}(_0x51ca,0x137));var _0xa51c=function(_0x39e283,_0x247e6b){_0x39e283=_0x39e283-0x0;var _0x7de89f=_0x51ca[_0x39e283];return _0x7de89f;};'use strict';var _=require('lodash');var util=require(_0xa51c('0x0'));var moment=require('moment');var BPromise=require(_0xa51c('0x1'));var rs=require(_0xa51c('0x2'));var fs=require('fs');var Redis=require(_0xa51c('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0xa51c('0x4'));var logger=require('../../config/logger')(_0xa51c('0x5'));var config=require('../../config/environment');var jayson=require(_0xa51c('0x6'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x393af9,_0x25f503,_0x378849){return new BPromise(function(_0x12def1,_0x140b19){return client['request'](_0x393af9,_0x378849)[_0xa51c('0x7')](function(_0x2b5c10){logger[_0xa51c('0x8')]('UserChatQueue,\x20%s,\x20%s',_0x25f503,_0xa51c('0x9'));logger[_0xa51c('0xa')]('UserChatQueue,\x20%s,\x20%s,\x20%s',_0x25f503,_0xa51c('0x9'),JSON[_0xa51c('0xb')](_0x2b5c10));if(_0x2b5c10[_0xa51c('0xc')]){if(_0x2b5c10[_0xa51c('0xc')][_0xa51c('0xd')]===0x1f4){logger['error'](_0xa51c('0xe'),_0x25f503,_0x2b5c10['error'][_0xa51c('0xf')]);return _0x140b19(_0x2b5c10[_0xa51c('0xc')][_0xa51c('0xf')]);}logger[_0xa51c('0xc')]('UserChatQueue,\x20%s,\x20%s',_0x25f503,_0x2b5c10[_0xa51c('0xc')][_0xa51c('0xf')]);return _0x12def1(_0x2b5c10['error'][_0xa51c('0xf')]);}else{logger['info'](_0xa51c('0xe'),_0x25f503,_0xa51c('0x9'));_0x12def1(_0x2b5c10['result'][_0xa51c('0xf')]);}})[_0xa51c('0x10')](function(_0x1715a1){logger[_0xa51c('0xc')](_0xa51c('0xe'),_0x25f503,_0x1715a1);_0x140b19(_0x1715a1);});});}
\ No newline at end of file