Built motion from commit d5e4af8c.|2.6.23
[motion2.git] / server / api / userVoiceQueueRt / userVoiceQueueRt.rpc.js
index 52170f2..3e8c28b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa160=['moment','bluebird','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','redis','defaults','localhost','./userVoiceQueueRt.socket','request','then','info','UserVoiceQueueRt,\x20%s,\x20%s','request\x20sent','debug','code','error','message','findAll','options','raw','sequelize','COUNT','`paused`\x20=\x201,\x201,\x20null','GetVoiceQueueRtPauses','stringify','lodash','util'];(function(_0x30f8ee,_0x47bb32){var _0x30ccfd=function(_0x520e94){while(--_0x520e94){_0x30f8ee['push'](_0x30f8ee['shift']());}};_0x30ccfd(++_0x47bb32);}(_0xa160,0xf6));var _0x0a16=function(_0x48a26b,_0x8826b4){_0x48a26b=_0x48a26b-0x0;var _0x113cff=_0xa160[_0x48a26b];return _0x113cff;};'use strict';var _=require(_0x0a16('0x0'));var util=require(_0x0a16('0x1'));var moment=require(_0x0a16('0x2'));var BPromise=require(_0x0a16('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x0a16('0x4'))['db'];var utils=require(_0x0a16('0x5'));var logger=require(_0x0a16('0x6'))(_0x0a16('0x7'));var config=require(_0x0a16('0x8'));var jayson=require(_0x0a16('0x9'));var client=jayson['client']['http']({'port':0x232a});config[_0x0a16('0xa')]=_[_0x0a16('0xb')](config[_0x0a16('0xa')],{'host':_0x0a16('0xc'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x0a16('0xa')]));require(_0x0a16('0xd'))['register'](socket);function respondWithRpcPromise(_0x877c0b,_0x3a9117,_0x347762){return new BPromise(function(_0x23f766,_0x54f489){return client[_0x0a16('0xe')](_0x877c0b,_0x347762)[_0x0a16('0xf')](function(_0x429a35){logger[_0x0a16('0x10')](_0x0a16('0x11'),_0x3a9117,_0x0a16('0x12'));logger[_0x0a16('0x13')]('UserVoiceQueueRt,\x20%s,\x20%s,\x20%s',_0x3a9117,'request\x20sent',JSON['stringify'](_0x429a35));if(_0x429a35['error']){if(_0x429a35['error'][_0x0a16('0x14')]===0x1f4){logger[_0x0a16('0x15')](_0x0a16('0x11'),_0x3a9117,_0x429a35[_0x0a16('0x15')][_0x0a16('0x16')]);return _0x54f489(_0x429a35[_0x0a16('0x15')][_0x0a16('0x16')]);}logger[_0x0a16('0x15')](_0x0a16('0x11'),_0x3a9117,_0x429a35[_0x0a16('0x15')][_0x0a16('0x16')]);return _0x23f766(_0x429a35['error'][_0x0a16('0x16')]);}else{logger[_0x0a16('0x10')]('UserVoiceQueueRt,\x20%s,\x20%s',_0x3a9117,_0x0a16('0x12'));_0x23f766(_0x429a35['result'][_0x0a16('0x16')]);}})['catch'](function(_0xa41900){logger[_0x0a16('0x15')](_0x0a16('0x11'),_0x3a9117,_0xa41900);_0x54f489(_0xa41900);});});}exports['GetVoiceQueueRtPauses']=function(_0x435d34){var _0x42fa90=this;return new Promise(function(_0xe4e119,_0xabc0da){return db['UserVoiceQueueRt'][_0x0a16('0x17')]({'raw':_0x435d34[_0x0a16('0x18')]?_0x435d34[_0x0a16('0x18')][_0x0a16('0x19')]===undefined?!![]:![]:!![],'where':_0x435d34['options']?_0x435d34[_0x0a16('0x18')]['where']||null:null,'attributes':[[db[_0x0a16('0x1a')]['fn'](_0x0a16('0x1b'),db[_0x0a16('0x1a')]['fn']('IF',db[_0x0a16('0x1a')]['literal'](_0x0a16('0x1c')))),'outboundQueuePauses']]})[_0x0a16('0xf')](function(_0x31e815){logger[_0x0a16('0x10')](_0x0a16('0x1d'),_0x435d34);logger[_0x0a16('0x13')](_0x0a16('0x1d'),_0x435d34,JSON[_0x0a16('0x1e')](_0x31e815));_0xe4e119(_0x31e815);})['catch'](function(_0x1166a7){logger[_0x0a16('0x15')](_0x0a16('0x1d'),_0x1166a7[_0x0a16('0x16')],_0x435d34);_0xabc0da(_0x42fa90[_0x0a16('0x15')](0x1f4,_0x1166a7[_0x0a16('0x16')]));});});};
\ No newline at end of file
+var _0x2f41=['COUNT','literal','`paused`\x20=\x201,\x201,\x20null','debug','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','redis','socket.io-emitter','./userVoiceQueueRt.socket','request','then','info','UserVoiceQueueRt,\x20%s,\x20%s','request\x20sent','UserVoiceQueueRt,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','GetVoiceQueueRtPauses','findAll','options','raw','sequelize'];(function(_0x46e363,_0x45d7e2){var _0x3fb059=function(_0x5e6274){while(--_0x5e6274){_0x46e363['push'](_0x46e363['shift']());}};_0x3fb059(++_0x45d7e2);}(_0x2f41,0x1e0));var _0x12f4=function(_0x1af05b,_0x5134b5){_0x1af05b=_0x1af05b-0x0;var _0x5be7cc=_0x2f41[_0x1af05b];return _0x5be7cc;};'use strict';var _=require(_0x12f4('0x0'));var util=require(_0x12f4('0x1'));var moment=require('moment');var BPromise=require(_0x12f4('0x2'));var rs=require(_0x12f4('0x3'));var fs=require('fs');var Redis=require(_0x12f4('0x4'));var db=require(_0x12f4('0x5'))['db'];var utils=require(_0x12f4('0x6'));var logger=require(_0x12f4('0x7'))('rpc');var config=require(_0x12f4('0x8'));var jayson=require(_0x12f4('0x9'));var client=jayson['client']['http']({'port':0x232a});config[_0x12f4('0xa')]=_['defaults'](config[_0x12f4('0xa')],{'host':'localhost','port':0x18eb});var socket=require(_0x12f4('0xb'))(new Redis(config[_0x12f4('0xa')]));require(_0x12f4('0xc'))['register'](socket);function respondWithRpcPromise(_0x500e46,_0x1fa317,_0x27c4e6){return new BPromise(function(_0x4fb814,_0x25c89f){return client[_0x12f4('0xd')](_0x500e46,_0x27c4e6)[_0x12f4('0xe')](function(_0x382fcc){logger[_0x12f4('0xf')](_0x12f4('0x10'),_0x1fa317,_0x12f4('0x11'));logger['debug'](_0x12f4('0x12'),_0x1fa317,'request\x20sent',JSON[_0x12f4('0x13')](_0x382fcc));if(_0x382fcc[_0x12f4('0x14')]){if(_0x382fcc['error'][_0x12f4('0x15')]===0x1f4){logger[_0x12f4('0x14')](_0x12f4('0x10'),_0x1fa317,_0x382fcc[_0x12f4('0x14')]['message']);return _0x25c89f(_0x382fcc['error']['message']);}logger[_0x12f4('0x14')](_0x12f4('0x10'),_0x1fa317,_0x382fcc[_0x12f4('0x14')][_0x12f4('0x16')]);return _0x4fb814(_0x382fcc[_0x12f4('0x14')][_0x12f4('0x16')]);}else{logger['info'](_0x12f4('0x10'),_0x1fa317,'request\x20sent');_0x4fb814(_0x382fcc[_0x12f4('0x17')][_0x12f4('0x16')]);}})[_0x12f4('0x18')](function(_0x3dd0fd){logger[_0x12f4('0x14')](_0x12f4('0x10'),_0x1fa317,_0x3dd0fd);_0x25c89f(_0x3dd0fd);});});}exports[_0x12f4('0x19')]=function(_0x672a8f){var _0x3c38a5=this;return new Promise(function(_0x423314,_0x585088){return db['UserVoiceQueueRt'][_0x12f4('0x1a')]({'raw':_0x672a8f[_0x12f4('0x1b')]?_0x672a8f['options'][_0x12f4('0x1c')]===undefined?!![]:![]:!![],'where':_0x672a8f[_0x12f4('0x1b')]?_0x672a8f['options']['where']||null:null,'attributes':[[db[_0x12f4('0x1d')]['fn'](_0x12f4('0x1e'),db[_0x12f4('0x1d')]['fn']('IF',db[_0x12f4('0x1d')][_0x12f4('0x1f')](_0x12f4('0x20')))),'outboundQueuePauses']]})[_0x12f4('0xe')](function(_0x124667){logger[_0x12f4('0xf')](_0x12f4('0x19'),_0x672a8f);logger[_0x12f4('0x21')](_0x12f4('0x19'),_0x672a8f,JSON[_0x12f4('0x13')](_0x124667));_0x423314(_0x124667);})['catch'](function(_0x4708f5){logger[_0x12f4('0x14')](_0x12f4('0x19'),_0x4708f5[_0x12f4('0x16')],_0x672a8f);_0x585088(_0x3c38a5[_0x12f4('0x14')](0x1f4,_0x4708f5[_0x12f4('0x16')]));});});};
\ No newline at end of file