Built motion from commit c49361c37b5f784889c8087ac6e0e91b7e6b561a. Version 3.0.0...
[motion-next.git] / server / services / routing / model / openchannelQueue.js
index c93c6bc..06873a6 100644 (file)
@@ -1 +1 @@
-const a1169_0x37fa=['loggedIn','md5','exports','stringify','length','updateRealtime','beepall','available','updateRouting','_rr','prototype','paused','strategy','format','timeout','mapAgentsId','lodash','openchannel:queue:%s','Agents','waiting','online','openchannelPause','name'];(function(_0xf7d750,_0x37faf6){const _0x5c6d1c=function(_0x4cfd74){while(--_0x4cfd74){_0xf7d750['push'](_0xf7d750['shift']());}};_0x5c6d1c(++_0x37faf6);}(a1169_0x37fa,0x1ae));const a1169_0x5c6d=function(_0xf7d750,_0x37faf6){_0xf7d750=_0xf7d750-0x0;let _0x5c6d1c=a1169_0x37fa[_0xf7d750];return _0x5c6d1c;};const _0x31d968=a1169_0x5c6d;'use strict';const _=require(_0x31d968('0x0')),md5=require(_0x31d968('0x8')),util=require('util'),{getSocket}=require('../../../rediscache'),io=getSocket();function OpenchannelQueue(_0x4cfd74){const _0x517ac7=_0x31d968;this['id']=_0x4cfd74['id']||0x0,this['name']=_0x4cfd74[_0x517ac7('0x6')]||'',this[_0x517ac7('0x15')]=_0x4cfd74[_0x517ac7('0x15')]||0xa,this[_0x517ac7('0x13')]=_0x4cfd74[_0x517ac7('0x13')]||_0x517ac7('0xd'),this[_0x517ac7('0x2')]=_0x4cfd74['Agents'],this[_0x517ac7('0x16')]={},this[_0x517ac7('0x3')]=0x0,this[_0x517ac7('0x8')]='',this[_0x517ac7('0xf')](),this[_0x517ac7('0xc')]();}OpenchannelQueue[_0x31d968('0x11')][_0x31d968('0xf')]=function(){const _0x2f471d=_0x31d968,_0xcd3f80=this[_0x2f471d('0x16')][_0x2f471d('0x10')];this[_0x2f471d('0x16')]=_['map'](this['Agents'],'id'),this[_0x2f471d('0x16')][_0x2f471d('0x10')]=_0xcd3f80;},OpenchannelQueue[_0x31d968('0x11')]['updateRealtime']=function(){const _0x4b35ff=_0x31d968;this[_0x4b35ff('0x7')]=0x0,this['paused']=0x0;for(let _0x2ff4e7=0x0;_0x2ff4e7<this[_0x4b35ff('0x2')][_0x4b35ff('0xb')];_0x2ff4e7+=0x1){this['Agents'][_0x2ff4e7][_0x4b35ff('0x4')]&&(this[_0x4b35ff('0x7')]+=0x1),this[_0x4b35ff('0x2')][_0x2ff4e7][_0x4b35ff('0x5')]&&(this[_0x4b35ff('0x12')]+=0x1);}this[_0x4b35ff('0xe')]=this[_0x4b35ff('0x7')]-this[_0x4b35ff('0x12')],this[_0x4b35ff('0xe')]=this['available']>=0x0?this['available']:0x0;const _0x31cc74={'id':this['id'],'available':this['available'],'loggedIn':this[_0x4b35ff('0x7')],'name':this[_0x4b35ff('0x6')],'paused':this['paused'],'waiting':this['waiting']},_0x46ed53=md5(JSON[_0x4b35ff('0xa')](_0x31cc74));this['md5']!==_0x46ed53&&(this[_0x4b35ff('0x8')]=_0x46ed53,io['to'](util[_0x4b35ff('0x14')](_0x4b35ff('0x1'),_0x31cc74[_0x4b35ff('0x6')]))['emit']('openchannel_queue:save',_0x31cc74));},module[_0x31d968('0x9')]=OpenchannelQueue;
\ No newline at end of file
+const a1169_0x2e16=['updateRealtime','exports','md5','loggedIn','mapAgentsId','available','map','Agents','waiting','util','emit','prototype','../../../rediscache','paused','strategy','_rr','updateRouting','online','name','length','lodash','openchannel_queue:save','openchannelPause','timeout'];(function(_0x127756,_0x2e16c2){const _0x59b2a9=function(_0x2f2655){while(--_0x2f2655){_0x127756['push'](_0x127756['shift']());}};_0x59b2a9(++_0x2e16c2);}(a1169_0x2e16,0xd5));const a1169_0x59b2=function(_0x127756,_0x2e16c2){_0x127756=_0x127756-0x0;let _0x59b2a9=a1169_0x2e16[_0x127756];return _0x59b2a9;};const _0xf809a2=a1169_0x59b2;'use strict';const _=require(_0xf809a2('0x17')),md5=require(_0xf809a2('0x5')),util=require(_0xf809a2('0xc')),{getSocket}=require(_0xf809a2('0xf')),io=getSocket();function OpenchannelQueue(_0x2f2655){const _0x2374df=_0xf809a2;this['id']=_0x2f2655['id']||0x0,this[_0x2374df('0x15')]=_0x2f2655[_0x2374df('0x15')]||'',this[_0x2374df('0x2')]=_0x2f2655[_0x2374df('0x2')]||0xa,this[_0x2374df('0x11')]=_0x2f2655[_0x2374df('0x11')]||'beepall',this[_0x2374df('0xa')]=_0x2f2655[_0x2374df('0xa')],this['mapAgentsId']={},this['waiting']=0x0,this[_0x2374df('0x5')]='',this[_0x2374df('0x13')](),this[_0x2374df('0x3')]();}OpenchannelQueue[_0xf809a2('0xe')][_0xf809a2('0x13')]=function(){const _0x544a63=_0xf809a2,_0x44b2bc=this[_0x544a63('0x7')]['_rr'];this['mapAgentsId']=_[_0x544a63('0x9')](this[_0x544a63('0xa')],'id'),this[_0x544a63('0x7')][_0x544a63('0x12')]=_0x44b2bc;},OpenchannelQueue['prototype']['updateRealtime']=function(){const _0x2314d6=_0xf809a2;this['loggedIn']=0x0,this[_0x2314d6('0x10')]=0x0;for(let _0x28ad11=0x0;_0x28ad11<this['Agents'][_0x2314d6('0x16')];_0x28ad11+=0x1){this[_0x2314d6('0xa')][_0x28ad11][_0x2314d6('0x14')]&&(this[_0x2314d6('0x6')]+=0x1),this['Agents'][_0x28ad11][_0x2314d6('0x1')]&&(this[_0x2314d6('0x10')]+=0x1);}this[_0x2314d6('0x8')]=this[_0x2314d6('0x6')]-this[_0x2314d6('0x10')],this[_0x2314d6('0x8')]=this['available']>=0x0?this[_0x2314d6('0x8')]:0x0;const _0xe8fc5b={'id':this['id'],'available':this[_0x2314d6('0x8')],'loggedIn':this[_0x2314d6('0x6')],'name':this[_0x2314d6('0x15')],'paused':this[_0x2314d6('0x10')],'waiting':this[_0x2314d6('0xb')]},_0x34410d=md5(JSON['stringify'](_0xe8fc5b));this[_0x2314d6('0x5')]!==_0x34410d&&(this[_0x2314d6('0x5')]=_0x34410d,io['to'](util['format']('openchannel:queue:%s',_0xe8fc5b[_0x2314d6('0x15')]))[_0x2314d6('0xd')](_0x2314d6('0x0'),_0xe8fc5b));},module[_0xf809a2('0x4')]=OpenchannelQueue;
\ No newline at end of file