Built motion from commit c116dc8b.|2.6.30
[motion2.git] / server / api / userVoiceQueueRt / userVoiceQueueRt.rpc.js
index a5e2873..f2dab71 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1fc4=['http','redis','socket.io-emitter','./userVoiceQueueRt.socket','register','request','info','UserVoiceQueueRt,\x20%s,\x20%s','debug','request\x20sent','stringify','error','code','message','result','catch','GetVoiceQueueRtPauses','UserVoiceQueueRt','findAll','options','raw','where','sequelize','COUNT','literal','`paused`\x20=\x201,\x201,\x20null','outboundQueuePauses','then','util','moment','bluebird','ioredis','../../mysqldb','../../config/environment','jayson/promise','client'];(function(_0x405281,_0x6a4947){var _0x37403e=function(_0x52f023){while(--_0x52f023){_0x405281['push'](_0x405281['shift']());}};_0x37403e(++_0x6a4947);}(_0x1fc4,0x88));var _0x41fc=function(_0x1ac595,_0x5d2081){_0x1ac595=_0x1ac595-0x0;var _0x455fff=_0x1fc4[_0x1ac595];return _0x455fff;};'use strict';var _=require('lodash');var util=require(_0x41fc('0x0'));var moment=require(_0x41fc('0x1'));var BPromise=require(_0x41fc('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x41fc('0x3'));var db=require(_0x41fc('0x4'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')('rpc');var config=require(_0x41fc('0x5'));var jayson=require(_0x41fc('0x6'));var client=jayson[_0x41fc('0x7')][_0x41fc('0x8')]({'port':0x232a});config[_0x41fc('0x9')]=_['defaults'](config[_0x41fc('0x9')],{'host':'localhost','port':0x18eb});var socket=require(_0x41fc('0xa'))(new Redis(config[_0x41fc('0x9')]));require(_0x41fc('0xb'))[_0x41fc('0xc')](socket);function respondWithRpcPromise(_0x275113,_0x27954e,_0x45e17d){return new BPromise(function(_0x238959,_0x182529){return client[_0x41fc('0xd')](_0x275113,_0x45e17d)['then'](function(_0x4e2758){logger[_0x41fc('0xe')](_0x41fc('0xf'),_0x27954e,'request\x20sent');logger[_0x41fc('0x10')]('UserVoiceQueueRt,\x20%s,\x20%s,\x20%s',_0x27954e,_0x41fc('0x11'),JSON[_0x41fc('0x12')](_0x4e2758));if(_0x4e2758['error']){if(_0x4e2758[_0x41fc('0x13')][_0x41fc('0x14')]===0x1f4){logger[_0x41fc('0x13')](_0x41fc('0xf'),_0x27954e,_0x4e2758['error'][_0x41fc('0x15')]);return _0x182529(_0x4e2758['error']['message']);}logger['error'](_0x41fc('0xf'),_0x27954e,_0x4e2758[_0x41fc('0x13')][_0x41fc('0x15')]);return _0x238959(_0x4e2758[_0x41fc('0x13')]['message']);}else{logger[_0x41fc('0xe')](_0x41fc('0xf'),_0x27954e,_0x41fc('0x11'));_0x238959(_0x4e2758[_0x41fc('0x16')][_0x41fc('0x15')]);}})[_0x41fc('0x17')](function(_0x27727b){logger[_0x41fc('0x13')]('UserVoiceQueueRt,\x20%s,\x20%s',_0x27954e,_0x27727b);_0x182529(_0x27727b);});});}exports[_0x41fc('0x18')]=function(_0x2a9eca){var _0x406f57=this;return new Promise(function(_0x64bd74,_0x27b5dc){return db[_0x41fc('0x19')][_0x41fc('0x1a')]({'raw':_0x2a9eca[_0x41fc('0x1b')]?_0x2a9eca[_0x41fc('0x1b')][_0x41fc('0x1c')]===undefined?!![]:![]:!![],'where':_0x2a9eca[_0x41fc('0x1b')]?_0x2a9eca[_0x41fc('0x1b')][_0x41fc('0x1d')]||null:null,'attributes':[[db[_0x41fc('0x1e')]['fn'](_0x41fc('0x1f'),db[_0x41fc('0x1e')]['fn']('IF',db[_0x41fc('0x1e')][_0x41fc('0x20')](_0x41fc('0x21')))),_0x41fc('0x22')]]})[_0x41fc('0x23')](function(_0x46b914){logger['info'](_0x41fc('0x18'),_0x2a9eca);logger[_0x41fc('0x10')](_0x41fc('0x18'),_0x2a9eca,JSON['stringify'](_0x46b914));_0x64bd74(_0x46b914);})[_0x41fc('0x17')](function(_0x537aea){logger[_0x41fc('0x13')]('GetVoiceQueueRtPauses',_0x537aea[_0x41fc('0x15')],_0x2a9eca);_0x27b5dc(_0x406f57['error'](0x1f4,_0x537aea[_0x41fc('0x15')]));});});};
\ No newline at end of file
+var _0x3646=['error','code','message','result','catch','GetVoiceQueueRtPauses','UserVoiceQueueRt','findAll','options','raw','where','sequelize','`paused`\x20=\x201,\x201,\x20null','outboundQueuePauses','then','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','client','http','redis','socket.io-emitter','./userVoiceQueueRt.socket','register','info','UserVoiceQueueRt,\x20%s,\x20%s','request\x20sent','debug','UserVoiceQueueRt,\x20%s,\x20%s,\x20%s','stringify'];(function(_0x44630b,_0x217ccd){var _0x423155=function(_0x98c712){while(--_0x98c712){_0x44630b['push'](_0x44630b['shift']());}};_0x423155(++_0x217ccd);}(_0x3646,0x127));var _0x6364=function(_0x5bcb9a,_0x1dd62e){_0x5bcb9a=_0x5bcb9a-0x0;var _0x230cba=_0x3646[_0x5bcb9a];return _0x230cba;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x6364('0x0'));var BPromise=require(_0x6364('0x1'));var rs=require(_0x6364('0x2'));var fs=require('fs');var Redis=require(_0x6364('0x3'));var db=require(_0x6364('0x4'))['db'];var utils=require(_0x6364('0x5'));var logger=require(_0x6364('0x6'))('rpc');var config=require(_0x6364('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x6364('0x8')][_0x6364('0x9')]({'port':0x232a});config[_0x6364('0xa')]=_['defaults'](config[_0x6364('0xa')],{'host':'localhost','port':0x18eb});var socket=require(_0x6364('0xb'))(new Redis(config[_0x6364('0xa')]));require(_0x6364('0xc'))[_0x6364('0xd')](socket);function respondWithRpcPromise(_0x442a9c,_0x3c5cb8,_0x8e8a34){return new BPromise(function(_0x447272,_0x449467){return client['request'](_0x442a9c,_0x8e8a34)['then'](function(_0x4b77f9){logger[_0x6364('0xe')](_0x6364('0xf'),_0x3c5cb8,_0x6364('0x10'));logger[_0x6364('0x11')](_0x6364('0x12'),_0x3c5cb8,_0x6364('0x10'),JSON[_0x6364('0x13')](_0x4b77f9));if(_0x4b77f9[_0x6364('0x14')]){if(_0x4b77f9[_0x6364('0x14')][_0x6364('0x15')]===0x1f4){logger[_0x6364('0x14')](_0x6364('0xf'),_0x3c5cb8,_0x4b77f9[_0x6364('0x14')][_0x6364('0x16')]);return _0x449467(_0x4b77f9[_0x6364('0x14')][_0x6364('0x16')]);}logger['error']('UserVoiceQueueRt,\x20%s,\x20%s',_0x3c5cb8,_0x4b77f9[_0x6364('0x14')][_0x6364('0x16')]);return _0x447272(_0x4b77f9[_0x6364('0x14')][_0x6364('0x16')]);}else{logger[_0x6364('0xe')](_0x6364('0xf'),_0x3c5cb8,_0x6364('0x10'));_0x447272(_0x4b77f9[_0x6364('0x17')][_0x6364('0x16')]);}})[_0x6364('0x18')](function(_0xd56ccb){logger['error'](_0x6364('0xf'),_0x3c5cb8,_0xd56ccb);_0x449467(_0xd56ccb);});});}exports[_0x6364('0x19')]=function(_0xce2c69){var _0x1e7e12=this;return new Promise(function(_0x401543,_0x198b44){return db[_0x6364('0x1a')][_0x6364('0x1b')]({'raw':_0xce2c69['options']?_0xce2c69[_0x6364('0x1c')][_0x6364('0x1d')]===undefined?!![]:![]:!![],'where':_0xce2c69[_0x6364('0x1c')]?_0xce2c69['options'][_0x6364('0x1e')]||null:null,'attributes':[[db[_0x6364('0x1f')]['fn']('COUNT',db['sequelize']['fn']('IF',db[_0x6364('0x1f')]['literal'](_0x6364('0x20')))),_0x6364('0x21')]]})[_0x6364('0x22')](function(_0x445c89){logger[_0x6364('0xe')](_0x6364('0x19'),_0xce2c69);logger[_0x6364('0x11')](_0x6364('0x19'),_0xce2c69,JSON['stringify'](_0x445c89));_0x401543(_0x445c89);})['catch'](function(_0xfcb39a){logger[_0x6364('0x14')](_0x6364('0x19'),_0xfcb39a[_0x6364('0x16')],_0xce2c69);_0x198b44(_0x1e7e12[_0x6364('0x14')](0x1f4,_0xfcb39a[_0x6364('0x16')]));});});};
\ No newline at end of file