Built motion from commit (unavailable).|2.0.83
[motion2.git] / server / services / routing / model / faxQueue.js
index 66f16ac..716ea0d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf643=['md5','format','fax:queue:%s','fax_queue:save','exports','socket.io-emitter','localhost','name','timeout','strategy','mapAgentsId','waiting','prototype','updateRouting','Agents','updateRealtime','paused','length','online','available','loggedIn','stringify'];(function(_0x5cac67,_0x1837d3){var _0x27ce41=function(_0x17910f){while(--_0x17910f){_0x5cac67['push'](_0x5cac67['shift']());}};_0x27ce41(++_0x1837d3);}(_0xf643,0x9f));var _0x3f64=function(_0x48f791,_0x57dbd7){_0x48f791=_0x48f791-0x0;var _0x5ec5ea=_0xf643[_0x48f791];return _0x5ec5ea;};'use strict';var _=require('lodash');var md5=require('md5');var util=require('util');var io=require(_0x3f64('0x0'))({'host':_0x3f64('0x1'),'port':0x18eb});function FaxQueue(_0x275e74){this['id']=_0x275e74['id']||0x0;this[_0x3f64('0x2')]=_0x275e74[_0x3f64('0x2')]||'';this[_0x3f64('0x3')]=_0x275e74[_0x3f64('0x3')]||0xa;this[_0x3f64('0x4')]=_0x275e74['strategy']||'beepall';this['Agents']=_0x275e74['Agents'];this[_0x3f64('0x5')]={};this[_0x3f64('0x6')]=0x0;this['md5']='';this['updateRouting']();this['updateRealtime']();}FaxQueue[_0x3f64('0x7')][_0x3f64('0x8')]=function(){var _0x59589a=this[_0x3f64('0x5')]['_rr'];this[_0x3f64('0x5')]=_['map'](this[_0x3f64('0x9')],'id');this[_0x3f64('0x5')]['_rr']=_0x59589a;};FaxQueue['prototype'][_0x3f64('0xa')]=function(){this['loggedIn']=0x0;this[_0x3f64('0xb')]=0x0;for(var _0x3784b1=0x0;_0x3784b1<this[_0x3f64('0x9')][_0x3f64('0xc')];_0x3784b1+=0x1){if(this[_0x3f64('0x9')][_0x3784b1][_0x3f64('0xd')]){this['loggedIn']+=0x1;}if(this[_0x3f64('0x9')][_0x3784b1]['faxPause']){this[_0x3f64('0xb')]+=0x1;}}this[_0x3f64('0xe')]=this[_0x3f64('0xf')]-this['paused'];this['available']=this['available']>=0x0?this[_0x3f64('0xe')]:0x0;var _0x3c143c={'id':this['id'],'available':this[_0x3f64('0xe')],'loggedIn':this[_0x3f64('0xf')],'name':this[_0x3f64('0x2')],'paused':this[_0x3f64('0xb')],'waiting':this[_0x3f64('0x6')]};var _0x4394ef=md5(JSON[_0x3f64('0x10')](_0x3c143c));if(this[_0x3f64('0x11')]!==_0x4394ef){this[_0x3f64('0x11')]=_0x4394ef;io['to'](util[_0x3f64('0x12')](_0x3f64('0x13'),_0x3c143c[_0x3f64('0x2')]))['emit'](_0x3f64('0x14'),_0x3c143c);}};module[_0x3f64('0x15')]=FaxQueue;
\ No newline at end of file
+var _0xde70=['../../../config/environment','redis','name','timeout','strategy','beepall','Agents','waiting','updateRouting','updateRealtime','prototype','_rr','mapAgentsId','map','loggedIn','paused','length','online','available','fax:queue:%s','emit','exports','lodash','md5','util'];(function(_0x2e32a5,_0xc5e0e4){var _0xeaf48a=function(_0x2a0592){while(--_0x2a0592){_0x2e32a5['push'](_0x2e32a5['shift']());}};_0xeaf48a(++_0xc5e0e4);}(_0xde70,0x93));var _0x0de7=function(_0x16a751,_0x1b8432){_0x16a751=_0x16a751-0x0;var _0x211682=_0xde70[_0x16a751];return _0x211682;};'use strict';var _=require(_0x0de7('0x0'));var md5=require(_0x0de7('0x1'));var util=require(_0x0de7('0x2'));var config=require(_0x0de7('0x3'));config['redis']=_['defaults'](config[_0x0de7('0x4')],{'host':'localhost','port':0x18eb});var io=require('socket.io-emitter')(config['redis']);function FaxQueue(_0x3b32e2){this['id']=_0x3b32e2['id']||0x0;this[_0x0de7('0x5')]=_0x3b32e2['name']||'';this['timeout']=_0x3b32e2[_0x0de7('0x6')]||0xa;this[_0x0de7('0x7')]=_0x3b32e2[_0x0de7('0x7')]||_0x0de7('0x8');this[_0x0de7('0x9')]=_0x3b32e2['Agents'];this['mapAgentsId']={};this[_0x0de7('0xa')]=0x0;this[_0x0de7('0x1')]='';this[_0x0de7('0xb')]();this[_0x0de7('0xc')]();}FaxQueue[_0x0de7('0xd')][_0x0de7('0xb')]=function(){var _0x4784da=this['mapAgentsId'][_0x0de7('0xe')];this[_0x0de7('0xf')]=_[_0x0de7('0x10')](this[_0x0de7('0x9')],'id');this[_0x0de7('0xf')]['_rr']=_0x4784da;};FaxQueue[_0x0de7('0xd')][_0x0de7('0xc')]=function(){this[_0x0de7('0x11')]=0x0;this[_0x0de7('0x12')]=0x0;for(var _0x4f2a5d=0x0;_0x4f2a5d<this[_0x0de7('0x9')][_0x0de7('0x13')];_0x4f2a5d+=0x1){if(this[_0x0de7('0x9')][_0x4f2a5d][_0x0de7('0x14')]){this['loggedIn']+=0x1;}if(this[_0x0de7('0x9')][_0x4f2a5d]['faxPause']){this['paused']+=0x1;}}this[_0x0de7('0x15')]=this[_0x0de7('0x11')]-this['paused'];this[_0x0de7('0x15')]=this[_0x0de7('0x15')]>=0x0?this[_0x0de7('0x15')]:0x0;var _0x55c600={'id':this['id'],'available':this['available'],'loggedIn':this[_0x0de7('0x11')],'name':this['name'],'paused':this[_0x0de7('0x12')],'waiting':this['waiting']};var _0x3c14d2=md5(JSON['stringify'](_0x55c600));if(this[_0x0de7('0x1')]!==_0x3c14d2){this[_0x0de7('0x1')]=_0x3c14d2;io['to'](util['format'](_0x0de7('0x16'),_0x55c600[_0x0de7('0x5')]))[_0x0de7('0x17')]('fax_queue:save',_0x55c600);}};module[_0x0de7('0x18')]=FaxQueue;
\ No newline at end of file