Built motion from commit 10af8726.|2.6.34
[motion2.git] / server / api / chatWebsite / chatWebsite.rpc.js
index aef1ac9..d93d423 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x44cd=['redis','defaults','localhost','request','then','info','debug','ChatWebsite,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','ChatWebsite,\x20%s,\x20%s','message','catch','lodash','util','moment','randomstring','ioredis','../../config/logger','rpc','../../config/environment','jayson/promise','http'];(function(_0x3957c6,_0x1c9858){var _0x257618=function(_0x2411f2){while(--_0x2411f2){_0x3957c6['push'](_0x3957c6['shift']());}};_0x257618(++_0x1c9858);}(_0x44cd,0x1d1));var _0xd44c=function(_0xa3400,_0x3a980a){_0xa3400=_0xa3400-0x0;var _0x33dba2=_0x44cd[_0xa3400];return _0x33dba2;};'use strict';var _=require(_0xd44c('0x0'));var util=require(_0xd44c('0x1'));var moment=require(_0xd44c('0x2'));var BPromise=require('bluebird');var rs=require(_0xd44c('0x3'));var fs=require('fs');var Redis=require(_0xd44c('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0xd44c('0x5'))(_0xd44c('0x6'));var config=require(_0xd44c('0x7'));var jayson=require(_0xd44c('0x8'));var client=jayson['client'][_0xd44c('0x9')]({'port':0x232a});config[_0xd44c('0xa')]=_[_0xd44c('0xb')](config['redis'],{'host':_0xd44c('0xc'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xd44c('0xa')]));require('./chatWebsite.socket')['register'](socket);function respondWithRpcPromise(_0x1803d2,_0x2efd7a,_0x3fc3a6){return new BPromise(function(_0x59495e,_0x228774){return client[_0xd44c('0xd')](_0x1803d2,_0x3fc3a6)[_0xd44c('0xe')](function(_0x5b3516){logger[_0xd44c('0xf')]('ChatWebsite,\x20%s,\x20%s',_0x2efd7a,'request\x20sent');logger[_0xd44c('0x10')](_0xd44c('0x11'),_0x2efd7a,_0xd44c('0x12'),JSON[_0xd44c('0x13')](_0x5b3516));if(_0x5b3516[_0xd44c('0x14')]){if(_0x5b3516['error'][_0xd44c('0x15')]===0x1f4){logger[_0xd44c('0x14')](_0xd44c('0x16'),_0x2efd7a,_0x5b3516['error'][_0xd44c('0x17')]);return _0x228774(_0x5b3516[_0xd44c('0x14')]['message']);}logger[_0xd44c('0x14')]('ChatWebsite,\x20%s,\x20%s',_0x2efd7a,_0x5b3516[_0xd44c('0x14')]['message']);return _0x59495e(_0x5b3516[_0xd44c('0x14')][_0xd44c('0x17')]);}else{logger[_0xd44c('0xf')](_0xd44c('0x16'),_0x2efd7a,_0xd44c('0x12'));_0x59495e(_0x5b3516['result'][_0xd44c('0x17')]);}})[_0xd44c('0x18')](function(_0x5612ce){logger[_0xd44c('0x14')]('ChatWebsite,\x20%s,\x20%s',_0x2efd7a,_0x5612ce);_0x228774(_0x5612ce);});});}
\ No newline at end of file
+var _0x9f48=['debug','ChatWebsite,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','ChatWebsite,\x20%s,\x20%s','message','catch','util','bluebird','randomstring','ioredis','../../config/utils','rpc','../../config/environment','client','http','redis','localhost','socket.io-emitter','./chatWebsite.socket','register','then'];(function(_0x2b29c4,_0x93b17c){var _0x127635=function(_0x221f8f){while(--_0x221f8f){_0x2b29c4['push'](_0x2b29c4['shift']());}};_0x127635(++_0x93b17c);}(_0x9f48,0x99));var _0x89f4=function(_0x3955eb,_0x5b43f1){_0x3955eb=_0x3955eb-0x0;var _0x268cdd=_0x9f48[_0x3955eb];return _0x268cdd;};'use strict';var _=require('lodash');var util=require(_0x89f4('0x0'));var moment=require('moment');var BPromise=require(_0x89f4('0x1'));var rs=require(_0x89f4('0x2'));var fs=require('fs');var Redis=require(_0x89f4('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x89f4('0x4'));var logger=require('../../config/logger')(_0x89f4('0x5'));var config=require(_0x89f4('0x6'));var jayson=require('jayson/promise');var client=jayson[_0x89f4('0x7')][_0x89f4('0x8')]({'port':0x232a});config[_0x89f4('0x9')]=_['defaults'](config[_0x89f4('0x9')],{'host':_0x89f4('0xa'),'port':0x18eb});var socket=require(_0x89f4('0xb'))(new Redis(config['redis']));require(_0x89f4('0xc'))[_0x89f4('0xd')](socket);function respondWithRpcPromise(_0x4284f6,_0x3ea53a,_0x4dacae){return new BPromise(function(_0x11cc26,_0x18e405){return client['request'](_0x4284f6,_0x4dacae)[_0x89f4('0xe')](function(_0x1d6522){logger['info']('ChatWebsite,\x20%s,\x20%s',_0x3ea53a,'request\x20sent');logger[_0x89f4('0xf')](_0x89f4('0x10'),_0x3ea53a,_0x89f4('0x11'),JSON[_0x89f4('0x12')](_0x1d6522));if(_0x1d6522[_0x89f4('0x13')]){if(_0x1d6522[_0x89f4('0x13')][_0x89f4('0x14')]===0x1f4){logger[_0x89f4('0x13')](_0x89f4('0x15'),_0x3ea53a,_0x1d6522[_0x89f4('0x13')]['message']);return _0x18e405(_0x1d6522['error'][_0x89f4('0x16')]);}logger['error']('ChatWebsite,\x20%s,\x20%s',_0x3ea53a,_0x1d6522[_0x89f4('0x13')][_0x89f4('0x16')]);return _0x11cc26(_0x1d6522[_0x89f4('0x13')][_0x89f4('0x16')]);}else{logger['info']('ChatWebsite,\x20%s,\x20%s',_0x3ea53a,_0x89f4('0x11'));_0x11cc26(_0x1d6522['result'][_0x89f4('0x16')]);}})[_0x89f4('0x17')](function(_0x248875){logger[_0x89f4('0x13')]('ChatWebsite,\x20%s,\x20%s',_0x3ea53a,_0x248875);_0x18e405(_0x248875);});});}
\ No newline at end of file