Built motion from commit 4a18b36e645f5fa4a517d36f9783bde259878164. Version 3.0.0...
[motion-next.git] / server / services / routing / model / openchannelQueue.js
index 339cfa0..aff2ed1 100644 (file)
@@ -1 +1 @@
-const a1170_0x2876=['length','md5','updateRouting','loggedIn','openchannel:queue:%s','map','format','available','strategy','Agents','util','updateRealtime','beepall','_rr','online','timeout','prototype','paused','waiting','mapAgentsId','name','exports','openchannelPause'];(function(_0x2bbe85,_0x287694){const _0x725f27=function(_0x25416a){while(--_0x25416a){_0x2bbe85['push'](_0x2bbe85['shift']());}};_0x725f27(++_0x287694);}(a1170_0x2876,0x15a));const a1170_0x725f=function(_0x2bbe85,_0x287694){_0x2bbe85=_0x2bbe85-0x0;let _0x725f27=a1170_0x2876[_0x2bbe85];return _0x725f27;};const _0x967d6c=a1170_0x725f;'use strict';const _=require('lodash'),md5=require(_0x967d6c('0x0')),util=require(_0x967d6c('0x9')),{getSocket}=require('../../../rediscache'),io=getSocket();function OpenchannelQueue(_0x25416a){const _0x59a1b6=_0x967d6c;this['id']=_0x25416a['id']||0x0,this[_0x59a1b6('0x13')]=_0x25416a[_0x59a1b6('0x13')]||'',this[_0x59a1b6('0xe')]=_0x25416a[_0x59a1b6('0xe')]||0xa,this['strategy']=_0x25416a[_0x59a1b6('0x7')]||_0x59a1b6('0xb'),this[_0x59a1b6('0x8')]=_0x25416a[_0x59a1b6('0x8')],this['mapAgentsId']={},this[_0x59a1b6('0x11')]=0x0,this['md5']='',this[_0x59a1b6('0x1')](),this[_0x59a1b6('0xa')]();}OpenchannelQueue['prototype'][_0x967d6c('0x1')]=function(){const _0xc7fe27=_0x967d6c,_0x53d7c8=this[_0xc7fe27('0x12')][_0xc7fe27('0xc')];this[_0xc7fe27('0x12')]=_[_0xc7fe27('0x4')](this[_0xc7fe27('0x8')],'id'),this[_0xc7fe27('0x12')][_0xc7fe27('0xc')]=_0x53d7c8;},OpenchannelQueue[_0x967d6c('0xf')]['updateRealtime']=function(){const _0x49a2d3=_0x967d6c;this['loggedIn']=0x0,this[_0x49a2d3('0x10')]=0x0;for(let _0x567798=0x0;_0x567798<this[_0x49a2d3('0x8')][_0x49a2d3('0x16')];_0x567798+=0x1){this[_0x49a2d3('0x8')][_0x567798][_0x49a2d3('0xd')]&&(this[_0x49a2d3('0x2')]+=0x1),this[_0x49a2d3('0x8')][_0x567798][_0x49a2d3('0x15')]&&(this[_0x49a2d3('0x10')]+=0x1);}this['available']=this[_0x49a2d3('0x2')]-this[_0x49a2d3('0x10')],this[_0x49a2d3('0x6')]=this[_0x49a2d3('0x6')]>=0x0?this[_0x49a2d3('0x6')]:0x0;const _0x590a3c={'id':this['id'],'available':this[_0x49a2d3('0x6')],'loggedIn':this[_0x49a2d3('0x2')],'name':this[_0x49a2d3('0x13')],'paused':this['paused'],'waiting':this['waiting']},_0x23f2b7=md5(JSON['stringify'](_0x590a3c));this[_0x49a2d3('0x0')]!==_0x23f2b7&&(this['md5']=_0x23f2b7,io['to'](util[_0x49a2d3('0x5')](_0x49a2d3('0x3'),_0x590a3c[_0x49a2d3('0x13')]))['emit']('openchannel_queue:save',_0x590a3c));},module[_0x967d6c('0x14')]=OpenchannelQueue;
\ No newline at end of file
+const a1170_0x3427=['loggedIn','waiting','paused','online','_rr','name','emit','strategy','available','format','beepall','mapAgentsId','timeout','updateRealtime','prototype','stringify','length','Agents','lodash','exports','updateRouting','md5','map'];(function(_0x2af8c3,_0x3427be){const _0xa41b62=function(_0x1cb06e){while(--_0x1cb06e){_0x2af8c3['push'](_0x2af8c3['shift']());}};_0xa41b62(++_0x3427be);}(a1170_0x3427,0x1bc));const a1170_0xa41b=function(_0x2af8c3,_0x3427be){_0x2af8c3=_0x2af8c3-0x0;let _0xa41b62=a1170_0x3427[_0x2af8c3];return _0xa41b62;};const _0x15848f=a1170_0xa41b;'use strict';const _=require(_0x15848f('0xb')),md5=require(_0x15848f('0xe')),util=require('util'),{getSocket}=require('../../../rediscache'),io=getSocket();function OpenchannelQueue(_0x1cb06e){const _0x19390e=_0x15848f;this['id']=_0x1cb06e['id']||0x0,this[_0x19390e('0x15')]=_0x1cb06e[_0x19390e('0x15')]||'',this[_0x19390e('0x5')]=_0x1cb06e['timeout']||0xa,this[_0x19390e('0x0')]=_0x1cb06e[_0x19390e('0x0')]||_0x19390e('0x3'),this['Agents']=_0x1cb06e['Agents'],this[_0x19390e('0x4')]={},this[_0x19390e('0x11')]=0x0,this[_0x19390e('0xe')]='',this[_0x19390e('0xd')](),this['updateRealtime']();}OpenchannelQueue[_0x15848f('0x7')]['updateRouting']=function(){const _0x3d1166=_0x15848f,_0x4dc6b4=this[_0x3d1166('0x4')][_0x3d1166('0x14')];this[_0x3d1166('0x4')]=_[_0x3d1166('0xf')](this['Agents'],'id'),this['mapAgentsId'][_0x3d1166('0x14')]=_0x4dc6b4;},OpenchannelQueue[_0x15848f('0x7')][_0x15848f('0x6')]=function(){const _0x162869=_0x15848f;this['loggedIn']=0x0,this[_0x162869('0x12')]=0x0;for(let _0x5805bd=0x0;_0x5805bd<this[_0x162869('0xa')][_0x162869('0x9')];_0x5805bd+=0x1){this['Agents'][_0x5805bd][_0x162869('0x13')]&&(this[_0x162869('0x10')]+=0x1),this[_0x162869('0xa')][_0x5805bd]['openchannelPause']&&(this[_0x162869('0x12')]+=0x1);}this['available']=this[_0x162869('0x10')]-this[_0x162869('0x12')],this[_0x162869('0x1')]=this['available']>=0x0?this[_0x162869('0x1')]:0x0;const _0x44d294={'id':this['id'],'available':this[_0x162869('0x1')],'loggedIn':this['loggedIn'],'name':this[_0x162869('0x15')],'paused':this[_0x162869('0x12')],'waiting':this[_0x162869('0x11')]},_0x474358=md5(JSON[_0x162869('0x8')](_0x44d294));this[_0x162869('0xe')]!==_0x474358&&(this['md5']=_0x474358,io['to'](util[_0x162869('0x2')]('openchannel:queue:%s',_0x44d294[_0x162869('0x15')]))[_0x162869('0x16')]('openchannel_queue:save',_0x44d294));},module[_0x15848f('0xc')]=OpenchannelQueue;
\ No newline at end of file