Built motion from commit 00bf23f6.|2.6.16
[motion2.git] / server / api / voicePrefix / voicePrefix.rpc.js
index fd8d279..9b090c5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8b8e=['error','code','message','result','lodash','moment','randomstring','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','socket.io-emitter','./voicePrefix.socket','request','then','info','VoicePrefix,\x20%s,\x20%s','request\x20sent','debug','VoicePrefix,\x20%s,\x20%s,\x20%s','stringify'];(function(_0x31ddea,_0x40de6d){var _0x12539b=function(_0x1d353b){while(--_0x1d353b){_0x31ddea['push'](_0x31ddea['shift']());}};_0x12539b(++_0x40de6d);}(_0x8b8e,0x108));var _0xe8b8=function(_0x1246ab,_0x2b7f94){_0x1246ab=_0x1246ab-0x0;var _0x15777c=_0x8b8e[_0x1246ab];return _0x15777c;};'use strict';var _=require(_0xe8b8('0x0'));var util=require('util');var moment=require(_0xe8b8('0x1'));var BPromise=require('bluebird');var rs=require(_0xe8b8('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xe8b8('0x3'));var logger=require(_0xe8b8('0x4'))(_0xe8b8('0x5'));var config=require(_0xe8b8('0x6'));var jayson=require(_0xe8b8('0x7'));var client=jayson[_0xe8b8('0x8')][_0xe8b8('0x9')]({'port':0x232a});config[_0xe8b8('0xa')]=_[_0xe8b8('0xb')](config[_0xe8b8('0xa')],{'host':'localhost','port':0x18eb});var socket=require(_0xe8b8('0xc'))(new Redis(config['redis']));require(_0xe8b8('0xd'))['register'](socket);function respondWithRpcPromise(_0x48b59f,_0x2ccbeb,_0xcf1e01){return new BPromise(function(_0x568241,_0x54eb14){return client[_0xe8b8('0xe')](_0x48b59f,_0xcf1e01)[_0xe8b8('0xf')](function(_0x886a64){logger[_0xe8b8('0x10')](_0xe8b8('0x11'),_0x2ccbeb,_0xe8b8('0x12'));logger[_0xe8b8('0x13')](_0xe8b8('0x14'),_0x2ccbeb,_0xe8b8('0x12'),JSON[_0xe8b8('0x15')](_0x886a64));if(_0x886a64[_0xe8b8('0x16')]){if(_0x886a64[_0xe8b8('0x16')][_0xe8b8('0x17')]===0x1f4){logger[_0xe8b8('0x16')]('VoicePrefix,\x20%s,\x20%s',_0x2ccbeb,_0x886a64[_0xe8b8('0x16')]['message']);return _0x54eb14(_0x886a64[_0xe8b8('0x16')][_0xe8b8('0x18')]);}logger[_0xe8b8('0x16')](_0xe8b8('0x11'),_0x2ccbeb,_0x886a64[_0xe8b8('0x16')][_0xe8b8('0x18')]);return _0x568241(_0x886a64[_0xe8b8('0x16')][_0xe8b8('0x18')]);}else{logger[_0xe8b8('0x10')](_0xe8b8('0x11'),_0x2ccbeb,'request\x20sent');_0x568241(_0x886a64[_0xe8b8('0x19')][_0xe8b8('0x18')]);}})['catch'](function(_0x35b573){logger[_0xe8b8('0x16')](_0xe8b8('0x11'),_0x2ccbeb,_0x35b573);_0x54eb14(_0x35b573);});});}
\ No newline at end of file
+var _0x82f8=['../../config/environment','jayson/promise','redis','defaults','localhost','register','request','then','info','debug','VoicePrefix,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','VoicePrefix,\x20%s,\x20%s','message','result','catch','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc'];(function(_0x5d31f3,_0x4239b0){var _0x1cc88c=function(_0x1be8fc){while(--_0x1be8fc){_0x5d31f3['push'](_0x5d31f3['shift']());}};_0x1cc88c(++_0x4239b0);}(_0x82f8,0x157));var _0x882f=function(_0x2915d1,_0x54c2df){_0x2915d1=_0x2915d1-0x0;var _0x479be9=_0x82f8[_0x2915d1];return _0x479be9;};'use strict';var _=require('lodash');var util=require(_0x882f('0x0'));var moment=require(_0x882f('0x1'));var BPromise=require('bluebird');var rs=require(_0x882f('0x2'));var fs=require('fs');var Redis=require(_0x882f('0x3'));var db=require(_0x882f('0x4'))['db'];var utils=require(_0x882f('0x5'));var logger=require(_0x882f('0x6'))(_0x882f('0x7'));var config=require(_0x882f('0x8'));var jayson=require(_0x882f('0x9'));var client=jayson['client']['http']({'port':0x232a});config[_0x882f('0xa')]=_[_0x882f('0xb')](config[_0x882f('0xa')],{'host':_0x882f('0xc'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x882f('0xa')]));require('./voicePrefix.socket')[_0x882f('0xd')](socket);function respondWithRpcPromise(_0x478c18,_0x3ead6e,_0x5e9b49){return new BPromise(function(_0x499654,_0x14d89b){return client[_0x882f('0xe')](_0x478c18,_0x5e9b49)[_0x882f('0xf')](function(_0x2f2e51){logger[_0x882f('0x10')]('VoicePrefix,\x20%s,\x20%s',_0x3ead6e,'request\x20sent');logger[_0x882f('0x11')](_0x882f('0x12'),_0x3ead6e,_0x882f('0x13'),JSON[_0x882f('0x14')](_0x2f2e51));if(_0x2f2e51[_0x882f('0x15')]){if(_0x2f2e51[_0x882f('0x15')][_0x882f('0x16')]===0x1f4){logger['error'](_0x882f('0x17'),_0x3ead6e,_0x2f2e51[_0x882f('0x15')][_0x882f('0x18')]);return _0x14d89b(_0x2f2e51[_0x882f('0x15')]['message']);}logger['error']('VoicePrefix,\x20%s,\x20%s',_0x3ead6e,_0x2f2e51[_0x882f('0x15')][_0x882f('0x18')]);return _0x499654(_0x2f2e51[_0x882f('0x15')][_0x882f('0x18')]);}else{logger[_0x882f('0x10')](_0x882f('0x17'),_0x3ead6e,_0x882f('0x13'));_0x499654(_0x2f2e51[_0x882f('0x19')]['message']);}})[_0x882f('0x1a')](function(_0x51e74f){logger['error'](_0x882f('0x17'),_0x3ead6e,_0x51e74f);_0x14d89b(_0x51e74f);});});}
\ No newline at end of file