Built motion from commit (unavailable).|2.5.23
[motion2.git] / server / api / voicePrefix / voicePrefix.rpc.js
index f5604f4..099e4f2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xaa36=['info','VoicePrefix,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','util','moment','bluebird','randomstring','ioredis','../../config/utils','rpc','jayson/promise','client','http','defaults','localhost','socket.io-emitter','./voicePrefix.socket','register','request','then'];(function(_0x1ff34a,_0x2d6b67){var _0x2fb901=function(_0xdd77e4){while(--_0xdd77e4){_0x1ff34a['push'](_0x1ff34a['shift']());}};_0x2fb901(++_0x2d6b67);}(_0xaa36,0xc7));var _0x6aa3=function(_0x3dcf74,_0x507713){_0x3dcf74=_0x3dcf74-0x0;var _0x1313bf=_0xaa36[_0x3dcf74];return _0x1313bf;};'use strict';var _=require('lodash');var util=require(_0x6aa3('0x0'));var moment=require(_0x6aa3('0x1'));var BPromise=require(_0x6aa3('0x2'));var rs=require(_0x6aa3('0x3'));var fs=require('fs');var Redis=require(_0x6aa3('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x6aa3('0x5'));var logger=require('../../config/logger')(_0x6aa3('0x6'));var config=require('../../config/environment');var jayson=require(_0x6aa3('0x7'));var client=jayson[_0x6aa3('0x8')][_0x6aa3('0x9')]({'port':0x232a});config['redis']=_[_0x6aa3('0xa')](config['redis'],{'host':_0x6aa3('0xb'),'port':0x18eb});var socket=require(_0x6aa3('0xc'))(new Redis(config['redis']));require(_0x6aa3('0xd'))[_0x6aa3('0xe')](socket);function respondWithRpcPromise(_0x308221,_0x27f750,_0xa59918){return new BPromise(function(_0x390052,_0x55ae2e){return client[_0x6aa3('0xf')](_0x308221,_0xa59918)[_0x6aa3('0x10')](function(_0x3ccbd8){logger[_0x6aa3('0x11')](_0x6aa3('0x12'),_0x27f750,_0x6aa3('0x13'));logger[_0x6aa3('0x14')]('VoicePrefix,\x20%s,\x20%s,\x20%s',_0x27f750,_0x6aa3('0x13'),JSON[_0x6aa3('0x15')](_0x3ccbd8));if(_0x3ccbd8[_0x6aa3('0x16')]){if(_0x3ccbd8['error'][_0x6aa3('0x17')]===0x1f4){logger[_0x6aa3('0x16')](_0x6aa3('0x12'),_0x27f750,_0x3ccbd8[_0x6aa3('0x16')][_0x6aa3('0x18')]);return _0x55ae2e(_0x3ccbd8[_0x6aa3('0x16')][_0x6aa3('0x18')]);}logger[_0x6aa3('0x16')](_0x6aa3('0x12'),_0x27f750,_0x3ccbd8[_0x6aa3('0x16')][_0x6aa3('0x18')]);return _0x390052(_0x3ccbd8[_0x6aa3('0x16')]['message']);}else{logger[_0x6aa3('0x11')]('VoicePrefix,\x20%s,\x20%s',_0x27f750,_0x6aa3('0x13'));_0x390052(_0x3ccbd8[_0x6aa3('0x19')][_0x6aa3('0x18')]);}})[_0x6aa3('0x1a')](function(_0xb32284){logger[_0x6aa3('0x16')](_0x6aa3('0x12'),_0x27f750,_0xb32284);_0x55ae2e(_0xb32284);});});}
\ No newline at end of file
+var _0x8658=['request\x20sent','VoicePrefix,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','lodash','util','moment','bluebird','randomstring','../../config/utils','../../config/environment','jayson/promise','client','http','redis','defaults','socket.io-emitter','./voicePrefix.socket','info','VoicePrefix,\x20%s,\x20%s'];(function(_0x3201d3,_0x96a6f8){var _0x446d66=function(_0x18d9e9){while(--_0x18d9e9){_0x3201d3['push'](_0x3201d3['shift']());}};_0x446d66(++_0x96a6f8);}(_0x8658,0x1d3));var _0x8865=function(_0x173441,_0x26b0d9){_0x173441=_0x173441-0x0;var _0x2423a8=_0x8658[_0x173441];return _0x2423a8;};'use strict';var _=require(_0x8865('0x0'));var util=require(_0x8865('0x1'));var moment=require(_0x8865('0x2'));var BPromise=require(_0x8865('0x3'));var rs=require(_0x8865('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x8865('0x5'));var logger=require('../../config/logger')('rpc');var config=require(_0x8865('0x6'));var jayson=require(_0x8865('0x7'));var client=jayson[_0x8865('0x8')][_0x8865('0x9')]({'port':0x232a});config[_0x8865('0xa')]=_[_0x8865('0xb')](config[_0x8865('0xa')],{'host':'localhost','port':0x18eb});var socket=require(_0x8865('0xc'))(new Redis(config['redis']));require(_0x8865('0xd'))['register'](socket);function respondWithRpcPromise(_0x15e4cb,_0x10774a,_0x552a41){return new BPromise(function(_0xf15ece,_0x1a2ba5){return client['request'](_0x15e4cb,_0x552a41)['then'](function(_0x9d29e8){logger[_0x8865('0xe')](_0x8865('0xf'),_0x10774a,_0x8865('0x10'));logger['debug'](_0x8865('0x11'),_0x10774a,_0x8865('0x10'),JSON[_0x8865('0x12')](_0x9d29e8));if(_0x9d29e8[_0x8865('0x13')]){if(_0x9d29e8[_0x8865('0x13')]['code']===0x1f4){logger[_0x8865('0x13')]('VoicePrefix,\x20%s,\x20%s',_0x10774a,_0x9d29e8[_0x8865('0x13')][_0x8865('0x14')]);return _0x1a2ba5(_0x9d29e8[_0x8865('0x13')]['message']);}logger[_0x8865('0x13')]('VoicePrefix,\x20%s,\x20%s',_0x10774a,_0x9d29e8[_0x8865('0x13')][_0x8865('0x14')]);return _0xf15ece(_0x9d29e8['error'][_0x8865('0x14')]);}else{logger[_0x8865('0xe')](_0x8865('0xf'),_0x10774a,'request\x20sent');_0xf15ece(_0x9d29e8[_0x8865('0x15')][_0x8865('0x14')]);}})[_0x8865('0x16')](function(_0x44fddf){logger[_0x8865('0x13')](_0x8865('0xf'),_0x10774a,_0x44fddf);_0x1a2ba5(_0x44fddf);});});}
\ No newline at end of file