Built motion from commit e1760111.|2.6.18
[motion2.git] / server / api / voicePrefix / voicePrefix.rpc.js
index 5719cbd..25a4eea 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa730=['error','VoicePrefix,\x20%s,\x20%s','message','result','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','then','info','request\x20sent','debug','VoicePrefix,\x20%s,\x20%s,\x20%s','stringify'];(function(_0x2a05dd,_0x32b37d){var _0x5b7cee=function(_0x3c64a1){while(--_0x3c64a1){_0x2a05dd['push'](_0x2a05dd['shift']());}};_0x5b7cee(++_0x32b37d);}(_0xa730,0x11d));var _0x0a73=function(_0x3c7238,_0x44dc8c){_0x3c7238=_0x3c7238-0x0;var _0x45e4e9=_0xa730[_0x3c7238];return _0x45e4e9;};'use strict';var _=require(_0x0a73('0x0'));var util=require(_0x0a73('0x1'));var moment=require(_0x0a73('0x2'));var BPromise=require('bluebird');var rs=require(_0x0a73('0x3'));var fs=require('fs');var Redis=require(_0x0a73('0x4'));var db=require(_0x0a73('0x5'))['db'];var utils=require(_0x0a73('0x6'));var logger=require(_0x0a73('0x7'))(_0x0a73('0x8'));var config=require(_0x0a73('0x9'));var jayson=require(_0x0a73('0xa'));var client=jayson[_0x0a73('0xb')][_0x0a73('0xc')]({'port':0x232a});config[_0x0a73('0xd')]=_[_0x0a73('0xe')](config[_0x0a73('0xd')],{'host':_0x0a73('0xf'),'port':0x18eb});var socket=require(_0x0a73('0x10'))(new Redis(config['redis']));require('./voicePrefix.socket')['register'](socket);function respondWithRpcPromise(_0x27f5fe,_0xe0b652,_0x55a15c){return new BPromise(function(_0xbfe917,_0x39aa38){return client['request'](_0x27f5fe,_0x55a15c)[_0x0a73('0x11')](function(_0x51a626){logger[_0x0a73('0x12')]('VoicePrefix,\x20%s,\x20%s',_0xe0b652,_0x0a73('0x13'));logger[_0x0a73('0x14')](_0x0a73('0x15'),_0xe0b652,_0x0a73('0x13'),JSON[_0x0a73('0x16')](_0x51a626));if(_0x51a626[_0x0a73('0x17')]){if(_0x51a626[_0x0a73('0x17')]['code']===0x1f4){logger['error'](_0x0a73('0x18'),_0xe0b652,_0x51a626[_0x0a73('0x17')][_0x0a73('0x19')]);return _0x39aa38(_0x51a626[_0x0a73('0x17')][_0x0a73('0x19')]);}logger[_0x0a73('0x17')](_0x0a73('0x18'),_0xe0b652,_0x51a626[_0x0a73('0x17')]['message']);return _0xbfe917(_0x51a626['error'][_0x0a73('0x19')]);}else{logger[_0x0a73('0x12')](_0x0a73('0x18'),_0xe0b652,'request\x20sent');_0xbfe917(_0x51a626[_0x0a73('0x1a')][_0x0a73('0x19')]);}})[_0x0a73('0x1b')](function(_0x1bc736){logger['error'](_0x0a73('0x18'),_0xe0b652,_0x1bc736);_0x39aa38(_0x1bc736);});});}
\ No newline at end of file
+var _0x6132=['message','result','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','http','redis','defaults','localhost','./voicePrefix.socket','register','request','then','info','VoicePrefix,\x20%s,\x20%s','request\x20sent','VoicePrefix,\x20%s,\x20%s,\x20%s','stringify','error','code'];(function(_0x39cc23,_0x515c44){var _0x17093d=function(_0x4daf91){while(--_0x4daf91){_0x39cc23['push'](_0x39cc23['shift']());}};_0x17093d(++_0x515c44);}(_0x6132,0x13a));var _0x2613=function(_0x1fda19,_0x504567){_0x1fda19=_0x1fda19-0x0;var _0x4b1879=_0x6132[_0x1fda19];return _0x4b1879;};'use strict';var _=require(_0x2613('0x0'));var util=require(_0x2613('0x1'));var moment=require(_0x2613('0x2'));var BPromise=require(_0x2613('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x2613('0x4'));var db=require(_0x2613('0x5'))['db'];var utils=require(_0x2613('0x6'));var logger=require(_0x2613('0x7'))('rpc');var config=require(_0x2613('0x8'));var jayson=require('jayson/promise');var client=jayson['client'][_0x2613('0x9')]({'port':0x232a});config[_0x2613('0xa')]=_[_0x2613('0xb')](config[_0x2613('0xa')],{'host':_0x2613('0xc'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x2613('0xa')]));require(_0x2613('0xd'))[_0x2613('0xe')](socket);function respondWithRpcPromise(_0x5c9af5,_0xe1a1ff,_0x12c800){return new BPromise(function(_0x6d4439,_0x37fe48){return client[_0x2613('0xf')](_0x5c9af5,_0x12c800)[_0x2613('0x10')](function(_0xcc6236){logger[_0x2613('0x11')](_0x2613('0x12'),_0xe1a1ff,_0x2613('0x13'));logger['debug'](_0x2613('0x14'),_0xe1a1ff,_0x2613('0x13'),JSON[_0x2613('0x15')](_0xcc6236));if(_0xcc6236[_0x2613('0x16')]){if(_0xcc6236['error'][_0x2613('0x17')]===0x1f4){logger[_0x2613('0x16')](_0x2613('0x12'),_0xe1a1ff,_0xcc6236[_0x2613('0x16')]['message']);return _0x37fe48(_0xcc6236[_0x2613('0x16')][_0x2613('0x18')]);}logger[_0x2613('0x16')](_0x2613('0x12'),_0xe1a1ff,_0xcc6236['error'][_0x2613('0x18')]);return _0x6d4439(_0xcc6236[_0x2613('0x16')]['message']);}else{logger[_0x2613('0x11')](_0x2613('0x12'),_0xe1a1ff,_0x2613('0x13'));_0x6d4439(_0xcc6236[_0x2613('0x19')][_0x2613('0x18')]);}})['catch'](function(_0x349c5c){logger[_0x2613('0x16')]('VoicePrefix,\x20%s,\x20%s',_0xe1a1ff,_0x349c5c);_0x37fe48(_0x349c5c);});});}
\ No newline at end of file