Built motion from commit 449495f6.|2.6.27
[motion2.git] / server / api / voiceContext / voiceContext.rpc.js
index d3ab0fe..99fced6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5cfa=['then','info','VoiceContext,\x20%s,\x20%s','debug','request\x20sent','stringify','error','code','message','catch','lodash','moment','rpc','../../config/environment','client','http','request'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0x5cfa,0x12b));var _0xa5cf=function(_0x29d67c,_0x17112d){_0x29d67c=_0x29d67c-0x0;var _0x3bea3b=_0x5cfa[_0x29d67c];return _0x3bea3b;};'use strict';var _=require(_0xa5cf('0x0'));var util=require('util');var moment=require(_0xa5cf('0x1'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xa5cf('0x2'));var config=require(_0xa5cf('0x3'));var jayson=require('jayson/promise');var client=jayson[_0xa5cf('0x4')][_0xa5cf('0x5')]({'port':0x232a});function respondWithRpcPromise(_0x1d106f,_0x52e32c,_0x3b107a){return new BPromise(function(_0x4369bb,_0x3e7b02){return client[_0xa5cf('0x6')](_0x1d106f,_0x3b107a)[_0xa5cf('0x7')](function(_0x482025){logger[_0xa5cf('0x8')](_0xa5cf('0x9'),_0x52e32c,'request\x20sent');logger[_0xa5cf('0xa')]('VoiceContext,\x20%s,\x20%s,\x20%s',_0x52e32c,_0xa5cf('0xb'),JSON[_0xa5cf('0xc')](_0x482025));if(_0x482025[_0xa5cf('0xd')]){if(_0x482025['error'][_0xa5cf('0xe')]===0x1f4){logger[_0xa5cf('0xd')]('VoiceContext,\x20%s,\x20%s',_0x52e32c,_0x482025[_0xa5cf('0xd')][_0xa5cf('0xf')]);return _0x3e7b02(_0x482025[_0xa5cf('0xd')][_0xa5cf('0xf')]);}logger[_0xa5cf('0xd')]('VoiceContext,\x20%s,\x20%s',_0x52e32c,_0x482025['error'][_0xa5cf('0xf')]);return _0x4369bb(_0x482025[_0xa5cf('0xd')]['message']);}else{logger[_0xa5cf('0x8')]('VoiceContext,\x20%s,\x20%s',_0x52e32c,_0xa5cf('0xb'));_0x4369bb(_0x482025['result'][_0xa5cf('0xf')]);}})[_0xa5cf('0x10')](function(_0x3c60d3){logger['error'](_0xa5cf('0x9'),_0x52e32c,_0x3c60d3);_0x3e7b02(_0x3c60d3);});});}
\ No newline at end of file
+var _0x457b=['VoiceContext,\x20%s,\x20%s','request\x20sent','debug','VoiceContext,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','then','info'];(function(_0x4c4376,_0x104803){var _0x5755d2=function(_0xbc7be3){while(--_0xbc7be3){_0x4c4376['push'](_0x4c4376['shift']());}};_0x5755d2(++_0x104803);}(_0x457b,0xca));var _0xb457=function(_0x27c436,_0x283d5f){_0x27c436=_0x27c436-0x0;var _0x453a21=_0x457b[_0x27c436];return _0x453a21;};'use strict';var _=require(_0xb457('0x0'));var util=require(_0xb457('0x1'));var moment=require('moment');var BPromise=require(_0xb457('0x2'));var rs=require(_0xb457('0x3'));var fs=require('fs');var Redis=require(_0xb457('0x4'));var db=require(_0xb457('0x5'))['db'];var utils=require(_0xb457('0x6'));var logger=require('../../config/logger')(_0xb457('0x7'));var config=require(_0xb457('0x8'));var jayson=require(_0xb457('0x9'));var client=jayson[_0xb457('0xa')][_0xb457('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x523e05,_0x5b8ba2,_0x13632b){return new BPromise(function(_0x2182d6,_0x48388c){return client['request'](_0x523e05,_0x13632b)[_0xb457('0xc')](function(_0x3baee8){logger[_0xb457('0xd')](_0xb457('0xe'),_0x5b8ba2,_0xb457('0xf'));logger[_0xb457('0x10')](_0xb457('0x11'),_0x5b8ba2,_0xb457('0xf'),JSON[_0xb457('0x12')](_0x3baee8));if(_0x3baee8[_0xb457('0x13')]){if(_0x3baee8[_0xb457('0x13')][_0xb457('0x14')]===0x1f4){logger['error']('VoiceContext,\x20%s,\x20%s',_0x5b8ba2,_0x3baee8[_0xb457('0x13')][_0xb457('0x15')]);return _0x48388c(_0x3baee8[_0xb457('0x13')][_0xb457('0x15')]);}logger[_0xb457('0x13')]('VoiceContext,\x20%s,\x20%s',_0x5b8ba2,_0x3baee8['error'][_0xb457('0x15')]);return _0x2182d6(_0x3baee8[_0xb457('0x13')][_0xb457('0x15')]);}else{logger[_0xb457('0xd')]('VoiceContext,\x20%s,\x20%s',_0x5b8ba2,_0xb457('0xf'));_0x2182d6(_0x3baee8[_0xb457('0x16')][_0xb457('0x15')]);}})[_0xb457('0x17')](function(_0x250a02){logger[_0xb457('0x13')](_0xb457('0xe'),_0x5b8ba2,_0x250a02);_0x48388c(_0x250a02);});});}
\ No newline at end of file