Built motion from commit (unavailable).|2.4.4
[motion2.git] / server / api / voicePrefix / voicePrefix.rpc.js
index c873cac..66a79d1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8b53=['randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','redis','defaults','localhost','socket.io-emitter','request','then','info','VoicePrefix,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','catch','util','moment'];(function(_0x3e0c45,_0x18dbef){var _0x11d4ad=function(_0x1cf214){while(--_0x1cf214){_0x3e0c45['push'](_0x3e0c45['shift']());}};_0x11d4ad(++_0x18dbef);}(_0x8b53,0x11c));var _0x38b5=function(_0x132ebc,_0x1be8b0){_0x132ebc=_0x132ebc-0x0;var _0x8ebe8c=_0x8b53[_0x132ebc];return _0x8ebe8c;};'use strict';var _=require('lodash');var util=require(_0x38b5('0x0'));var moment=require(_0x38b5('0x1'));var BPromise=require('bluebird');var rs=require(_0x38b5('0x2'));var fs=require('fs');var Redis=require(_0x38b5('0x3'));var db=require(_0x38b5('0x4'))['db'];var utils=require(_0x38b5('0x5'));var logger=require(_0x38b5('0x6'))(_0x38b5('0x7'));var config=require(_0x38b5('0x8'));var jayson=require(_0x38b5('0x9'));var client=jayson['client'][_0x38b5('0xa')]({'port':0x232a});config[_0x38b5('0xb')]=_[_0x38b5('0xc')](config[_0x38b5('0xb')],{'host':_0x38b5('0xd'),'port':0x18eb});var socket=require(_0x38b5('0xe'))(new Redis(config['redis']));require('./voicePrefix.socket')['register'](socket);function respondWithRpcPromise(_0x5d025b,_0x2a4f84,_0x4d9feb){return new BPromise(function(_0x451779,_0x51390e){return client[_0x38b5('0xf')](_0x5d025b,_0x4d9feb)[_0x38b5('0x10')](function(_0xca83d4){logger[_0x38b5('0x11')](_0x38b5('0x12'),_0x2a4f84,_0x38b5('0x13'));logger[_0x38b5('0x14')]('VoicePrefix,\x20%s,\x20%s,\x20%s',_0x2a4f84,_0x38b5('0x13'),JSON[_0x38b5('0x15')](_0xca83d4));if(_0xca83d4[_0x38b5('0x16')]){if(_0xca83d4[_0x38b5('0x16')][_0x38b5('0x17')]===0x1f4){logger[_0x38b5('0x16')](_0x38b5('0x12'),_0x2a4f84,_0xca83d4[_0x38b5('0x16')][_0x38b5('0x18')]);return _0x51390e(_0xca83d4[_0x38b5('0x16')][_0x38b5('0x18')]);}logger['error'](_0x38b5('0x12'),_0x2a4f84,_0xca83d4['error'][_0x38b5('0x18')]);return _0x451779(_0xca83d4['error'][_0x38b5('0x18')]);}else{logger[_0x38b5('0x11')](_0x38b5('0x12'),_0x2a4f84,'request\x20sent');_0x451779(_0xca83d4['result'][_0x38b5('0x18')]);}})[_0x38b5('0x19')](function(_0xd837a9){logger[_0x38b5('0x16')]('VoicePrefix,\x20%s,\x20%s',_0x2a4f84,_0xd837a9);_0x51390e(_0xd837a9);});});}
\ No newline at end of file
+var _0x6ff1=['randomstring','ioredis','../../config/utils','rpc','../../config/environment','client','http','redis','defaults','localhost','register','request','then','info','VoicePrefix,\x20%s,\x20%s','request\x20sent','debug','VoicePrefix,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','lodash','moment','bluebird'];(function(_0x1833cd,_0x369128){var _0x4360ac=function(_0x377337){while(--_0x377337){_0x1833cd['push'](_0x1833cd['shift']());}};_0x4360ac(++_0x369128);}(_0x6ff1,0x169));var _0x16ff=function(_0x55e17a,_0x3ee6b0){_0x55e17a=_0x55e17a-0x0;var _0x502ce6=_0x6ff1[_0x55e17a];return _0x502ce6;};'use strict';var _=require(_0x16ff('0x0'));var util=require('util');var moment=require(_0x16ff('0x1'));var BPromise=require(_0x16ff('0x2'));var rs=require(_0x16ff('0x3'));var fs=require('fs');var Redis=require(_0x16ff('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x16ff('0x5'));var logger=require('../../config/logger')(_0x16ff('0x6'));var config=require(_0x16ff('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x16ff('0x8')][_0x16ff('0x9')]({'port':0x232a});config[_0x16ff('0xa')]=_[_0x16ff('0xb')](config[_0x16ff('0xa')],{'host':_0x16ff('0xc'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x16ff('0xa')]));require('./voicePrefix.socket')[_0x16ff('0xd')](socket);function respondWithRpcPromise(_0x34bd7e,_0x241bde,_0x32a517){return new BPromise(function(_0x53b973,_0x4dd1b1){return client[_0x16ff('0xe')](_0x34bd7e,_0x32a517)[_0x16ff('0xf')](function(_0x2fd5b8){logger[_0x16ff('0x10')](_0x16ff('0x11'),_0x241bde,_0x16ff('0x12'));logger[_0x16ff('0x13')](_0x16ff('0x14'),_0x241bde,'request\x20sent',JSON[_0x16ff('0x15')](_0x2fd5b8));if(_0x2fd5b8[_0x16ff('0x16')]){if(_0x2fd5b8[_0x16ff('0x16')][_0x16ff('0x17')]===0x1f4){logger['error'](_0x16ff('0x11'),_0x241bde,_0x2fd5b8[_0x16ff('0x16')][_0x16ff('0x18')]);return _0x4dd1b1(_0x2fd5b8[_0x16ff('0x16')][_0x16ff('0x18')]);}logger[_0x16ff('0x16')]('VoicePrefix,\x20%s,\x20%s',_0x241bde,_0x2fd5b8[_0x16ff('0x16')][_0x16ff('0x18')]);return _0x53b973(_0x2fd5b8[_0x16ff('0x16')][_0x16ff('0x18')]);}else{logger['info'](_0x16ff('0x11'),_0x241bde,_0x16ff('0x12'));_0x53b973(_0x2fd5b8[_0x16ff('0x19')][_0x16ff('0x18')]);}})['catch'](function(_0x2adf6e){logger['error'](_0x16ff('0x11'),_0x241bde,_0x2adf6e);_0x4dd1b1(_0x2adf6e);});});}
\ No newline at end of file