Built motion from commit 639a1a7f.|2.6.19
[motion2.git] / server / api / teamVoiceQueue / teamVoiceQueue.rpc.js
index fe85cdc..02064bd 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x38f5=['ioredis','../../mysqldb','../../config/utils','../../config/environment','jayson/promise','client','http','then','request\x20sent','debug','TeamVoiceQueue,\x20%s,\x20%s,\x20%s','error','code','message','TeamVoiceQueue,\x20%s,\x20%s','result','catch','util','moment','randomstring'];(function(_0x4a4566,_0x59b4c3){var _0x530d00=function(_0x1656f9){while(--_0x1656f9){_0x4a4566['push'](_0x4a4566['shift']());}};_0x530d00(++_0x59b4c3);}(_0x38f5,0x89));var _0x538f=function(_0x4659c6,_0x16e31c){_0x4659c6=_0x4659c6-0x0;var _0x59a9ea=_0x38f5[_0x4659c6];return _0x59a9ea;};'use strict';var _=require('lodash');var util=require(_0x538f('0x0'));var moment=require(_0x538f('0x1'));var BPromise=require('bluebird');var rs=require(_0x538f('0x2'));var fs=require('fs');var Redis=require(_0x538f('0x3'));var db=require(_0x538f('0x4'))['db'];var utils=require(_0x538f('0x5'));var logger=require('../../config/logger')('rpc');var config=require(_0x538f('0x6'));var jayson=require(_0x538f('0x7'));var client=jayson[_0x538f('0x8')][_0x538f('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x387907,_0x4f42d2,_0x45e772){return new BPromise(function(_0x6e3292,_0x5757a8){return client['request'](_0x387907,_0x45e772)[_0x538f('0xa')](function(_0x1006e6){logger['info']('TeamVoiceQueue,\x20%s,\x20%s',_0x4f42d2,_0x538f('0xb'));logger[_0x538f('0xc')](_0x538f('0xd'),_0x4f42d2,_0x538f('0xb'),JSON['stringify'](_0x1006e6));if(_0x1006e6[_0x538f('0xe')]){if(_0x1006e6[_0x538f('0xe')][_0x538f('0xf')]===0x1f4){logger[_0x538f('0xe')]('TeamVoiceQueue,\x20%s,\x20%s',_0x4f42d2,_0x1006e6[_0x538f('0xe')][_0x538f('0x10')]);return _0x5757a8(_0x1006e6[_0x538f('0xe')][_0x538f('0x10')]);}logger['error']('TeamVoiceQueue,\x20%s,\x20%s',_0x4f42d2,_0x1006e6[_0x538f('0xe')][_0x538f('0x10')]);return _0x6e3292(_0x1006e6[_0x538f('0xe')][_0x538f('0x10')]);}else{logger['info'](_0x538f('0x11'),_0x4f42d2,_0x538f('0xb'));_0x6e3292(_0x1006e6[_0x538f('0x12')]['message']);}})[_0x538f('0x13')](function(_0x44670a){logger[_0x538f('0xe')](_0x538f('0x11'),_0x4f42d2,_0x44670a);_0x5757a8(_0x44670a);});});}
\ No newline at end of file
+var _0x87a4=['rpc','../../config/environment','jayson/promise','client','then','TeamVoiceQueue,\x20%s,\x20%s','request\x20sent','debug','error','code','message','info','result','catch','lodash','util','randomstring','ioredis'];(function(_0x5c2278,_0x5e1e08){var _0x482004=function(_0xb56a0e){while(--_0xb56a0e){_0x5c2278['push'](_0x5c2278['shift']());}};_0x482004(++_0x5e1e08);}(_0x87a4,0x12e));var _0x487a=function(_0x5bae43,_0xdc3682){_0x5bae43=_0x5bae43-0x0;var _0x5f1277=_0x87a4[_0x5bae43];return _0x5f1277;};'use strict';var _=require(_0x487a('0x0'));var util=require(_0x487a('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x487a('0x2'));var fs=require('fs');var Redis=require(_0x487a('0x3'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x487a('0x4'));var config=require(_0x487a('0x5'));var jayson=require(_0x487a('0x6'));var client=jayson[_0x487a('0x7')]['http']({'port':0x232a});function respondWithRpcPromise(_0x319a5c,_0x356a3e,_0x3a1e6f){return new BPromise(function(_0x17d0e2,_0x533969){return client['request'](_0x319a5c,_0x3a1e6f)[_0x487a('0x8')](function(_0xbb05cc){logger['info'](_0x487a('0x9'),_0x356a3e,_0x487a('0xa'));logger[_0x487a('0xb')]('TeamVoiceQueue,\x20%s,\x20%s,\x20%s',_0x356a3e,_0x487a('0xa'),JSON['stringify'](_0xbb05cc));if(_0xbb05cc[_0x487a('0xc')]){if(_0xbb05cc['error'][_0x487a('0xd')]===0x1f4){logger[_0x487a('0xc')](_0x487a('0x9'),_0x356a3e,_0xbb05cc['error']['message']);return _0x533969(_0xbb05cc['error'][_0x487a('0xe')]);}logger['error'](_0x487a('0x9'),_0x356a3e,_0xbb05cc[_0x487a('0xc')][_0x487a('0xe')]);return _0x17d0e2(_0xbb05cc[_0x487a('0xc')][_0x487a('0xe')]);}else{logger[_0x487a('0xf')]('TeamVoiceQueue,\x20%s,\x20%s',_0x356a3e,_0x487a('0xa'));_0x17d0e2(_0xbb05cc[_0x487a('0x10')][_0x487a('0xe')]);}})[_0x487a('0x11')](function(_0x167346){logger['error'](_0x487a('0x9'),_0x356a3e,_0x167346);_0x533969(_0x167346);});});}
\ No newline at end of file