Built motion from commit 5b761a7b.|2.5.36
[motion2.git] / server / api / voicePrefix / voicePrefix.rpc.js
index 808a59e..7b16d2d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x855f=['result','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','client','http','redis','defaults','localhost','socket.io-emitter','./voicePrefix.socket','register','request','info','VoicePrefix,\x20%s,\x20%s','debug','VoicePrefix,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message'];(function(_0x369151,_0x179f72){var _0x4292d5=function(_0x330422){while(--_0x330422){_0x369151['push'](_0x369151['shift']());}};_0x4292d5(++_0x179f72);}(_0x855f,0x145));var _0xf855=function(_0x52d1db,_0x2166e6){_0x52d1db=_0x52d1db-0x0;var _0x2aa455=_0x855f[_0x52d1db];return _0x2aa455;};'use strict';var _=require(_0xf855('0x0'));var util=require('util');var moment=require(_0xf855('0x1'));var BPromise=require(_0xf855('0x2'));var rs=require(_0xf855('0x3'));var fs=require('fs');var Redis=require(_0xf855('0x4'));var db=require(_0xf855('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xf855('0x6'))(_0xf855('0x7'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0xf855('0x8')][_0xf855('0x9')]({'port':0x232a});config[_0xf855('0xa')]=_[_0xf855('0xb')](config[_0xf855('0xa')],{'host':_0xf855('0xc'),'port':0x18eb});var socket=require(_0xf855('0xd'))(new Redis(config['redis']));require(_0xf855('0xe'))[_0xf855('0xf')](socket);function respondWithRpcPromise(_0x24aebb,_0xe34bb5,_0x88e71b){return new BPromise(function(_0x232289,_0x20f9dd){return client[_0xf855('0x10')](_0x24aebb,_0x88e71b)['then'](function(_0x280647){logger[_0xf855('0x11')](_0xf855('0x12'),_0xe34bb5,'request\x20sent');logger[_0xf855('0x13')](_0xf855('0x14'),_0xe34bb5,_0xf855('0x15'),JSON[_0xf855('0x16')](_0x280647));if(_0x280647[_0xf855('0x17')]){if(_0x280647[_0xf855('0x17')][_0xf855('0x18')]===0x1f4){logger['error'](_0xf855('0x12'),_0xe34bb5,_0x280647[_0xf855('0x17')][_0xf855('0x19')]);return _0x20f9dd(_0x280647[_0xf855('0x17')][_0xf855('0x19')]);}logger[_0xf855('0x17')](_0xf855('0x12'),_0xe34bb5,_0x280647['error']['message']);return _0x232289(_0x280647[_0xf855('0x17')][_0xf855('0x19')]);}else{logger[_0xf855('0x11')]('VoicePrefix,\x20%s,\x20%s',_0xe34bb5,_0xf855('0x15'));_0x232289(_0x280647[_0xf855('0x1a')]['message']);}})['catch'](function(_0x238e59){logger[_0xf855('0x17')](_0xf855('0x12'),_0xe34bb5,_0x238e59);_0x20f9dd(_0x238e59);});});}
\ No newline at end of file
+var _0xc2c7=['util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','client','http','localhost','socket.io-emitter','redis','./voicePrefix.socket','register','request','then','info','VoicePrefix,\x20%s,\x20%s','request\x20sent','debug','VoicePrefix,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch'];(function(_0x403697,_0x1da82c){var _0x1a97b2=function(_0x265352){while(--_0x265352){_0x403697['push'](_0x403697['shift']());}};_0x1a97b2(++_0x1da82c);}(_0xc2c7,0x134));var _0x7c2c=function(_0x12156e,_0x2d50dd){_0x12156e=_0x12156e-0x0;var _0x18aaa2=_0xc2c7[_0x12156e];return _0x18aaa2;};'use strict';var _=require('lodash');var util=require(_0x7c2c('0x0'));var moment=require(_0x7c2c('0x1'));var BPromise=require(_0x7c2c('0x2'));var rs=require(_0x7c2c('0x3'));var fs=require('fs');var Redis=require(_0x7c2c('0x4'));var db=require(_0x7c2c('0x5'))['db'];var utils=require(_0x7c2c('0x6'));var logger=require(_0x7c2c('0x7'))('rpc');var config=require('../../config/environment');var jayson=require(_0x7c2c('0x8'));var client=jayson[_0x7c2c('0x9')][_0x7c2c('0xa')]({'port':0x232a});config['redis']=_['defaults'](config['redis'],{'host':_0x7c2c('0xb'),'port':0x18eb});var socket=require(_0x7c2c('0xc'))(new Redis(config[_0x7c2c('0xd')]));require(_0x7c2c('0xe'))[_0x7c2c('0xf')](socket);function respondWithRpcPromise(_0x57b107,_0x3093d2,_0x307bec){return new BPromise(function(_0x285ff6,_0x1bfeaf){return client[_0x7c2c('0x10')](_0x57b107,_0x307bec)[_0x7c2c('0x11')](function(_0x2cb057){logger[_0x7c2c('0x12')](_0x7c2c('0x13'),_0x3093d2,_0x7c2c('0x14'));logger[_0x7c2c('0x15')](_0x7c2c('0x16'),_0x3093d2,_0x7c2c('0x14'),JSON[_0x7c2c('0x17')](_0x2cb057));if(_0x2cb057[_0x7c2c('0x18')]){if(_0x2cb057[_0x7c2c('0x18')]['code']===0x1f4){logger['error'](_0x7c2c('0x13'),_0x3093d2,_0x2cb057[_0x7c2c('0x18')][_0x7c2c('0x19')]);return _0x1bfeaf(_0x2cb057['error'][_0x7c2c('0x19')]);}logger[_0x7c2c('0x18')]('VoicePrefix,\x20%s,\x20%s',_0x3093d2,_0x2cb057[_0x7c2c('0x18')]['message']);return _0x285ff6(_0x2cb057[_0x7c2c('0x18')]['message']);}else{logger[_0x7c2c('0x12')](_0x7c2c('0x13'),_0x3093d2,_0x7c2c('0x14'));_0x285ff6(_0x2cb057[_0x7c2c('0x1a')][_0x7c2c('0x19')]);}})[_0x7c2c('0x1b')](function(_0x2c1378){logger[_0x7c2c('0x18')](_0x7c2c('0x13'),_0x3093d2,_0x2c1378);_0x1bfeaf(_0x2c1378);});});}
\ No newline at end of file