X-Git-Url: http://repos.xcallymotion.com/?a=blobdiff_plain;f=server%2Fapi%2FuserChatQueue%2FuserChatQueue.rpc.js;h=6f5db9950f011824e847bcf26ad50cd7943c5d8c;hb=44bd2814959684a7f7b774f2c71a3b12f9ba5952;hp=eee9ad8fba112de17fc0c07e0d410544b81c58de;hpb=868a31873a4f5d6a45b7a9cfef882f2e311d37fa;p=motion2.git diff --git a/server/api/userChatQueue/userChatQueue.rpc.js b/server/api/userChatQueue/userChatQueue.rpc.js index eee9ad8..6f5db99 100644 --- a/server/api/userChatQueue/userChatQueue.rpc.js +++ b/server/api/userChatQueue/userChatQueue.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7c5b=['catch','lodash','moment','bluebird','ioredis','../../mysqldb','../../config/logger','jayson/promise','client','http','then','info','UserChatQueue,\x20%s,\x20%s','request\x20sent','UserChatQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result'];(function(_0x3eff8f,_0x58a445){var _0x23eabd=function(_0xb93f18){while(--_0xb93f18){_0x3eff8f['push'](_0x3eff8f['shift']());}};_0x23eabd(++_0x58a445);}(_0x7c5b,0x17d));var _0xb7c5=function(_0x1ac2dc,_0x594a87){_0x1ac2dc=_0x1ac2dc-0x0;var _0x303c26=_0x7c5b[_0x1ac2dc];return _0x303c26;};'use strict';var _=require(_0xb7c5('0x0'));var util=require('util');var moment=require(_0xb7c5('0x1'));var BPromise=require(_0xb7c5('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xb7c5('0x3'));var db=require(_0xb7c5('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xb7c5('0x5'))('rpc');var config=require('../../config/environment');var jayson=require(_0xb7c5('0x6'));var client=jayson[_0xb7c5('0x7')][_0xb7c5('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x2e64f3,_0x5586a2,_0x4f33a7){return new BPromise(function(_0x5f18fa,_0x30bc6b){return client['request'](_0x2e64f3,_0x4f33a7)[_0xb7c5('0x9')](function(_0x25e174){logger[_0xb7c5('0xa')](_0xb7c5('0xb'),_0x5586a2,_0xb7c5('0xc'));logger['debug'](_0xb7c5('0xd'),_0x5586a2,_0xb7c5('0xc'),JSON[_0xb7c5('0xe')](_0x25e174));if(_0x25e174['error']){if(_0x25e174[_0xb7c5('0xf')][_0xb7c5('0x10')]===0x1f4){logger[_0xb7c5('0xf')](_0xb7c5('0xb'),_0x5586a2,_0x25e174[_0xb7c5('0xf')][_0xb7c5('0x11')]);return _0x30bc6b(_0x25e174[_0xb7c5('0xf')][_0xb7c5('0x11')]);}logger[_0xb7c5('0xf')](_0xb7c5('0xb'),_0x5586a2,_0x25e174['error'][_0xb7c5('0x11')]);return _0x5f18fa(_0x25e174[_0xb7c5('0xf')][_0xb7c5('0x11')]);}else{logger[_0xb7c5('0xa')]('UserChatQueue,\x20%s,\x20%s',_0x5586a2,_0xb7c5('0xc'));_0x5f18fa(_0x25e174[_0xb7c5('0x12')][_0xb7c5('0x11')]);}})[_0xb7c5('0x13')](function(_0xdb9f0f){logger[_0xb7c5('0xf')](_0xb7c5('0xb'),_0x5586a2,_0xdb9f0f);_0x30bc6b(_0xdb9f0f);});});} \ No newline at end of file +var _0xb701=['../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','UserChatQueue,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','info','result','lodash','util','bluebird','randomstring','ioredis'];(function(_0x299261,_0x44f12b){var _0xf1e2ec=function(_0x520f23){while(--_0x520f23){_0x299261['push'](_0x299261['shift']());}};_0xf1e2ec(++_0x44f12b);}(_0xb701,0x1c9));var _0x1b70=function(_0x46698a,_0x8de1e4){_0x46698a=_0x46698a-0x0;var _0x356db0=_0xb701[_0x46698a];return _0x356db0;};'use strict';var _=require(_0x1b70('0x0'));var util=require(_0x1b70('0x1'));var moment=require('moment');var BPromise=require(_0x1b70('0x2'));var rs=require(_0x1b70('0x3'));var fs=require('fs');var Redis=require(_0x1b70('0x4'));var db=require(_0x1b70('0x5'))['db'];var utils=require(_0x1b70('0x6'));var logger=require(_0x1b70('0x7'))('rpc');var config=require(_0x1b70('0x8'));var jayson=require(_0x1b70('0x9'));var client=jayson[_0x1b70('0xa')][_0x1b70('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x42392c,_0xad0973,_0x25c5e2){return new BPromise(function(_0x1e38d6,_0x424944){return client[_0x1b70('0xc')](_0x42392c,_0x25c5e2)['then'](function(_0x457ff6){logger['info'](_0x1b70('0xd'),_0xad0973,_0x1b70('0xe'));logger[_0x1b70('0xf')]('UserChatQueue,\x20%s,\x20%s,\x20%s',_0xad0973,_0x1b70('0xe'),JSON[_0x1b70('0x10')](_0x457ff6));if(_0x457ff6[_0x1b70('0x11')]){if(_0x457ff6[_0x1b70('0x11')][_0x1b70('0x12')]===0x1f4){logger[_0x1b70('0x11')]('UserChatQueue,\x20%s,\x20%s',_0xad0973,_0x457ff6[_0x1b70('0x11')][_0x1b70('0x13')]);return _0x424944(_0x457ff6[_0x1b70('0x11')][_0x1b70('0x13')]);}logger['error'](_0x1b70('0xd'),_0xad0973,_0x457ff6[_0x1b70('0x11')][_0x1b70('0x13')]);return _0x1e38d6(_0x457ff6[_0x1b70('0x11')][_0x1b70('0x13')]);}else{logger[_0x1b70('0x14')](_0x1b70('0xd'),_0xad0973,_0x1b70('0xe'));_0x1e38d6(_0x457ff6[_0x1b70('0x15')]['message']);}})['catch'](function(_0x138940){logger['error']('UserChatQueue,\x20%s,\x20%s',_0xad0973,_0x138940);_0x424944(_0x138940);});});} \ No newline at end of file