X-Git-Url: http://repos.xcallymotion.com/?a=blobdiff_plain;f=server%2Fservices%2Frouting%2Fmodel%2FfaxQueue.js;h=fb2ca7902cda928a7bafea2cba008a66d01e73e1;hb=f1d1468b3a09c62a6041ebd552725da73d637879;hp=a7fe54f5186020fe1abdd21bee90a4425197b0b8;hpb=d2fd33d6b242a53e18c7b82fe692ff8c6c0965a8;p=motion2.git diff --git a/server/services/routing/model/faxQueue.js b/server/services/routing/model/faxQueue.js index a7fe54f..fb2ca79 100644 --- a/server/services/routing/model/faxQueue.js +++ b/server/services/routing/model/faxQueue.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4f00=['strategy','beepall','Agents','mapAgentsId','waiting','md5','updateRouting','_rr','updateRealtime','loggedIn','online','faxPause','paused','available','stringify','format','emit','exports','lodash','ioredis','defaults','localhost','socket.io-emitter','name','timeout'];(function(_0x191483,_0x3303fa){var _0x5763c8=function(_0xfd7dc4){while(--_0xfd7dc4){_0x191483['push'](_0x191483['shift']());}};_0x5763c8(++_0x3303fa);}(_0x4f00,0x8f));var _0x04f0=function(_0x3bf83f,_0x181cac){_0x3bf83f=_0x3bf83f-0x0;var _0x22c4a9=_0x4f00[_0x3bf83f];return _0x22c4a9;};'use strict';var _=require(_0x04f0('0x0'));var md5=require('md5');var util=require('util');var Redis=require(_0x04f0('0x1'));var config=require('../../../config/environment');config['redis']=_[_0x04f0('0x2')](config['redis'],{'host':_0x04f0('0x3'),'port':0x18eb});var io=require(_0x04f0('0x4'))(new Redis(config['redis']));function FaxQueue(_0xa498c6){this['id']=_0xa498c6['id']||0x0;this[_0x04f0('0x5')]=_0xa498c6['name']||'';this[_0x04f0('0x6')]=_0xa498c6['timeout']||0xa;this[_0x04f0('0x7')]=_0xa498c6['strategy']||_0x04f0('0x8');this[_0x04f0('0x9')]=_0xa498c6['Agents'];this[_0x04f0('0xa')]={};this[_0x04f0('0xb')]=0x0;this[_0x04f0('0xc')]='';this[_0x04f0('0xd')]();this['updateRealtime']();}FaxQueue['prototype'][_0x04f0('0xd')]=function(){var _0x41bf5a=this['mapAgentsId']['_rr'];this[_0x04f0('0xa')]=_['map'](this[_0x04f0('0x9')],'id');this[_0x04f0('0xa')][_0x04f0('0xe')]=_0x41bf5a;};FaxQueue['prototype'][_0x04f0('0xf')]=function(){this[_0x04f0('0x10')]=0x0;this['paused']=0x0;for(var _0x3d15b9=0x0;_0x3d15b9=0x0?this[_0x04f0('0x14')]:0x0;var _0x343012={'id':this['id'],'available':this[_0x04f0('0x14')],'loggedIn':this[_0x04f0('0x10')],'name':this[_0x04f0('0x5')],'paused':this[_0x04f0('0x13')],'waiting':this['waiting']};var _0x38b1f1=md5(JSON[_0x04f0('0x15')](_0x343012));if(this[_0x04f0('0xc')]!==_0x38b1f1){this[_0x04f0('0xc')]=_0x38b1f1;io['to'](util[_0x04f0('0x16')]('fax:queue:%s',_0x343012[_0x04f0('0x5')]))[_0x04f0('0x17')]('fax_queue:save',_0x343012);}};module[_0x04f0('0x18')]=FaxQueue; \ No newline at end of file +var _0xe189=['util','ioredis','../../../config/environment','redis','localhost','socket.io-emitter','name','timeout','strategy','Agents','updateRouting','prototype','mapAgentsId','_rr','map','updateRealtime','loggedIn','paused','length','online','faxPause','available','waiting','format','fax:queue:%s','emit','fax_queue:save','md5'];(function(_0x4953da,_0x5adaca){var _0x2d3780=function(_0x458f36){while(--_0x458f36){_0x4953da['push'](_0x4953da['shift']());}};_0x2d3780(++_0x5adaca);}(_0xe189,0x133));var _0x9e18=function(_0xe8626e,_0x36d242){_0xe8626e=_0xe8626e-0x0;var _0x3a021f=_0xe189[_0xe8626e];return _0x3a021f;};'use strict';var _=require('lodash');var md5=require(_0x9e18('0x0'));var util=require(_0x9e18('0x1'));var Redis=require(_0x9e18('0x2'));var config=require(_0x9e18('0x3'));config['redis']=_['defaults'](config[_0x9e18('0x4')],{'host':_0x9e18('0x5'),'port':0x18eb});var io=require(_0x9e18('0x6'))(new Redis(config['redis']));function FaxQueue(_0x407696){this['id']=_0x407696['id']||0x0;this[_0x9e18('0x7')]=_0x407696[_0x9e18('0x7')]||'';this[_0x9e18('0x8')]=_0x407696[_0x9e18('0x8')]||0xa;this[_0x9e18('0x9')]=_0x407696[_0x9e18('0x9')]||'beepall';this[_0x9e18('0xa')]=_0x407696[_0x9e18('0xa')];this['mapAgentsId']={};this['waiting']=0x0;this[_0x9e18('0x0')]='';this[_0x9e18('0xb')]();this['updateRealtime']();}FaxQueue[_0x9e18('0xc')][_0x9e18('0xb')]=function(){var _0x318842=this[_0x9e18('0xd')][_0x9e18('0xe')];this[_0x9e18('0xd')]=_[_0x9e18('0xf')](this['Agents'],'id');this[_0x9e18('0xd')][_0x9e18('0xe')]=_0x318842;};FaxQueue[_0x9e18('0xc')][_0x9e18('0x10')]=function(){this[_0x9e18('0x11')]=0x0;this[_0x9e18('0x12')]=0x0;for(var _0x3158d7=0x0;_0x3158d7=0x0?this['available']:0x0;var _0xc6245d={'id':this['id'],'available':this[_0x9e18('0x16')],'loggedIn':this[_0x9e18('0x11')],'name':this['name'],'paused':this[_0x9e18('0x12')],'waiting':this[_0x9e18('0x17')]};var _0x47071f=md5(JSON['stringify'](_0xc6245d));if(this[_0x9e18('0x0')]!==_0x47071f){this['md5']=_0x47071f;io['to'](util[_0x9e18('0x18')](_0x9e18('0x19'),_0xc6245d[_0x9e18('0x7')]))[_0x9e18('0x1a')](_0x9e18('0x1b'),_0xc6245d);}};module['exports']=FaxQueue; \ No newline at end of file