Built motion from commit 85328c08.|2.5.50
[motion2.git] / server / api / team / team.rpc.js
index 0e21279..5a2e723 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfd28=['code','message','request\x20sent','result','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./team.socket','register','request','then','info','Team,\x20%s,\x20%s','debug','Team,\x20%s,\x20%s,\x20%s','stringify','error'];(function(_0x4506ad,_0x247564){var _0x1d2252=function(_0x17349e){while(--_0x17349e){_0x4506ad['push'](_0x4506ad['shift']());}};_0x1d2252(++_0x247564);}(_0xfd28,0x112));var _0x8fd2=function(_0x119d5a,_0x19b457){_0x119d5a=_0x119d5a-0x0;var _0x15bff4=_0xfd28[_0x119d5a];return _0x15bff4;};'use strict';var _=require(_0x8fd2('0x0'));var util=require(_0x8fd2('0x1'));var moment=require(_0x8fd2('0x2'));var BPromise=require(_0x8fd2('0x3'));var rs=require(_0x8fd2('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x8fd2('0x5'))['db'];var utils=require(_0x8fd2('0x6'));var logger=require(_0x8fd2('0x7'))(_0x8fd2('0x8'));var config=require('../../config/environment');var jayson=require(_0x8fd2('0x9'));var client=jayson[_0x8fd2('0xa')][_0x8fd2('0xb')]({'port':0x232a});config[_0x8fd2('0xc')]=_[_0x8fd2('0xd')](config[_0x8fd2('0xc')],{'host':_0x8fd2('0xe'),'port':0x18eb});var socket=require(_0x8fd2('0xf'))(new Redis(config[_0x8fd2('0xc')]));require(_0x8fd2('0x10'))[_0x8fd2('0x11')](socket);function respondWithRpcPromise(_0x5e65f8,_0x5e5c1b,_0x50d562){return new BPromise(function(_0x50a246,_0x53bfbb){return client[_0x8fd2('0x12')](_0x5e65f8,_0x50d562)[_0x8fd2('0x13')](function(_0x433881){logger[_0x8fd2('0x14')](_0x8fd2('0x15'),_0x5e5c1b,'request\x20sent');logger[_0x8fd2('0x16')](_0x8fd2('0x17'),_0x5e5c1b,'request\x20sent',JSON[_0x8fd2('0x18')](_0x433881));if(_0x433881[_0x8fd2('0x19')]){if(_0x433881[_0x8fd2('0x19')][_0x8fd2('0x1a')]===0x1f4){logger[_0x8fd2('0x19')]('Team,\x20%s,\x20%s',_0x5e5c1b,_0x433881[_0x8fd2('0x19')][_0x8fd2('0x1b')]);return _0x53bfbb(_0x433881[_0x8fd2('0x19')]['message']);}logger[_0x8fd2('0x19')]('Team,\x20%s,\x20%s',_0x5e5c1b,_0x433881['error'][_0x8fd2('0x1b')]);return _0x50a246(_0x433881[_0x8fd2('0x19')][_0x8fd2('0x1b')]);}else{logger[_0x8fd2('0x14')](_0x8fd2('0x15'),_0x5e5c1b,_0x8fd2('0x1c'));_0x50a246(_0x433881[_0x8fd2('0x1d')][_0x8fd2('0x1b')]);}})['catch'](function(_0x26a8bd){logger['error'](_0x8fd2('0x15'),_0x5e5c1b,_0x26a8bd);_0x53bfbb(_0x26a8bd);});});}
\ No newline at end of file
+var _0x077f=['http','localhost','redis','./team.socket','register','request','info','Team,\x20%s,\x20%s','request\x20sent','debug','Team,\x20%s,\x20%s,\x20%s','error','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','jayson/promise','client'];(function(_0x262f2c,_0x3ea263){var _0x437433=function(_0x884037){while(--_0x884037){_0x262f2c['push'](_0x262f2c['shift']());}};_0x437433(++_0x3ea263);}(_0x077f,0x8c));var _0xf077=function(_0x30fe4b,_0x5742e5){_0x30fe4b=_0x30fe4b-0x0;var _0x89d370=_0x077f[_0x30fe4b];return _0x89d370;};'use strict';var _=require(_0xf077('0x0'));var util=require(_0xf077('0x1'));var moment=require(_0xf077('0x2'));var BPromise=require(_0xf077('0x3'));var rs=require(_0xf077('0x4'));var fs=require('fs');var Redis=require(_0xf077('0x5'));var db=require(_0xf077('0x6'))['db'];var utils=require(_0xf077('0x7'));var logger=require('../../config/logger')('rpc');var config=require('../../config/environment');var jayson=require(_0xf077('0x8'));var client=jayson[_0xf077('0x9')][_0xf077('0xa')]({'port':0x232a});config['redis']=_['defaults'](config['redis'],{'host':_0xf077('0xb'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xf077('0xc')]));require(_0xf077('0xd'))[_0xf077('0xe')](socket);function respondWithRpcPromise(_0x5a6fa1,_0xf1cb1c,_0x5aed0c){return new BPromise(function(_0x5df14c,_0x10f4a3){return client[_0xf077('0xf')](_0x5a6fa1,_0x5aed0c)['then'](function(_0x2bfa29){logger[_0xf077('0x10')](_0xf077('0x11'),_0xf1cb1c,_0xf077('0x12'));logger[_0xf077('0x13')](_0xf077('0x14'),_0xf1cb1c,_0xf077('0x12'),JSON['stringify'](_0x2bfa29));if(_0x2bfa29[_0xf077('0x15')]){if(_0x2bfa29[_0xf077('0x15')]['code']===0x1f4){logger[_0xf077('0x15')](_0xf077('0x11'),_0xf1cb1c,_0x2bfa29[_0xf077('0x15')]['message']);return _0x10f4a3(_0x2bfa29['error'][_0xf077('0x16')]);}logger['error'](_0xf077('0x11'),_0xf1cb1c,_0x2bfa29[_0xf077('0x15')][_0xf077('0x16')]);return _0x5df14c(_0x2bfa29[_0xf077('0x15')][_0xf077('0x16')]);}else{logger[_0xf077('0x10')](_0xf077('0x11'),_0xf1cb1c,_0xf077('0x12'));_0x5df14c(_0x2bfa29[_0xf077('0x17')][_0xf077('0x16')]);}})[_0xf077('0x18')](function(_0x280e8e){logger[_0xf077('0x15')]('Team,\x20%s,\x20%s',_0xf1cb1c,_0x280e8e);_0x10f4a3(_0x280e8e);});});}
\ No newline at end of file