X-Git-Url: http://repos.xcallymotion.com/?a=blobdiff_plain;f=server%2Fservices%2Frouting%2Fmodel%2FmailQueue.js;h=a36102c025e40665cb2ea72bdd5aa7561f84fa89;hb=4baefdac9c37d4300115b8e539c5781a6d78e036;hp=5047e4097ecb997b20f877df27a780ab58d04f04;hpb=8cdeeda1196ee7d2ad7723378ea9a4f6c5d1e83a;p=motion2.git diff --git a/server/services/routing/model/mailQueue.js b/server/services/routing/model/mailQueue.js index 5047e40..a36102c 100644 --- a/server/services/routing/model/mailQueue.js +++ b/server/services/routing/model/mailQueue.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xafa7=['name','timeout','strategy','beepall','Agents','mapAgentsId','md5','updateRouting','prototype','_rr','map','updateRealtime','loggedIn','length','online','mailPause','paused','available','waiting','stringify','format','mail:queue:%s','mail_queue:save','exports','lodash','util','ioredis','redis','localhost','socket.io-emitter'];(function(_0x4843f9,_0x4af459){var _0x193c6a=function(_0x51eca9){while(--_0x51eca9){_0x4843f9['push'](_0x4843f9['shift']());}};_0x193c6a(++_0x4af459);}(_0xafa7,0x1bc));var _0x7afa=function(_0x5a7d5f,_0x5695cb){_0x5a7d5f=_0x5a7d5f-0x0;var _0x5dcded=_0xafa7[_0x5a7d5f];return _0x5dcded;};'use strict';var _=require(_0x7afa('0x0'));var md5=require('md5');var util=require(_0x7afa('0x1'));var Redis=require(_0x7afa('0x2'));var config=require('../../../config/environment');config[_0x7afa('0x3')]=_['defaults'](config['redis'],{'host':_0x7afa('0x4'),'port':0x18eb});var io=require(_0x7afa('0x5'))(new Redis(config['redis']));function MailQueue(_0x28d76e){this['id']=_0x28d76e['id']||0x0;this[_0x7afa('0x6')]=_0x28d76e['name']||'';this[_0x7afa('0x7')]=_0x28d76e['timeout']||0xa;this[_0x7afa('0x8')]=_0x28d76e[_0x7afa('0x8')]||_0x7afa('0x9');this[_0x7afa('0xa')]=_0x28d76e[_0x7afa('0xa')];this[_0x7afa('0xb')]={};this['waiting']=0x0;this[_0x7afa('0xc')]='';this[_0x7afa('0xd')]();this['updateRealtime']();}MailQueue[_0x7afa('0xe')]['updateRouting']=function(){var _0x46639a=this[_0x7afa('0xb')][_0x7afa('0xf')];this['mapAgentsId']=_[_0x7afa('0x10')](this['Agents'],'id');this[_0x7afa('0xb')][_0x7afa('0xf')]=_0x46639a;};MailQueue[_0x7afa('0xe')][_0x7afa('0x11')]=function(){this[_0x7afa('0x12')]=0x0;this['paused']=0x0;for(var _0x21880e=0x0;_0x21880e=0x0?this[_0x7afa('0x17')]:0x0;var _0x647ba8={'id':this['id'],'available':this[_0x7afa('0x17')],'loggedIn':this['loggedIn'],'name':this[_0x7afa('0x6')],'paused':this['paused'],'waiting':this[_0x7afa('0x18')]};var _0x4c9714=md5(JSON[_0x7afa('0x19')](_0x647ba8));if(this[_0x7afa('0xc')]!==_0x4c9714){this[_0x7afa('0xc')]=_0x4c9714;io['to'](util[_0x7afa('0x1a')](_0x7afa('0x1b'),_0x647ba8[_0x7afa('0x6')]))['emit'](_0x7afa('0x1c'),_0x647ba8);}};module[_0x7afa('0x1d')]=MailQueue; \ No newline at end of file +var _0x2ee2=['timeout','strategy','beepall','Agents','mapAgentsId','waiting','updateRouting','updateRealtime','prototype','_rr','map','length','online','loggedIn','mailPause','paused','available','format','mail:queue:%s','emit','mail_queue:save','exports','lodash','md5','ioredis','../../../config/environment','redis','defaults','socket.io-emitter','name'];(function(_0x3bb99f,_0x809eb6){var _0x1cfe1d=function(_0x1017e0){while(--_0x1017e0){_0x3bb99f['push'](_0x3bb99f['shift']());}};_0x1cfe1d(++_0x809eb6);}(_0x2ee2,0x160));var _0x22ee=function(_0x1fa760,_0x1bf063){_0x1fa760=_0x1fa760-0x0;var _0xd8eda1=_0x2ee2[_0x1fa760];return _0xd8eda1;};'use strict';var _=require(_0x22ee('0x0'));var md5=require(_0x22ee('0x1'));var util=require('util');var Redis=require(_0x22ee('0x2'));var config=require(_0x22ee('0x3'));config[_0x22ee('0x4')]=_[_0x22ee('0x5')](config[_0x22ee('0x4')],{'host':'localhost','port':0x18eb});var io=require(_0x22ee('0x6'))(new Redis(config[_0x22ee('0x4')]));function MailQueue(_0x15929b){this['id']=_0x15929b['id']||0x0;this['name']=_0x15929b[_0x22ee('0x7')]||'';this[_0x22ee('0x8')]=_0x15929b['timeout']||0xa;this[_0x22ee('0x9')]=_0x15929b[_0x22ee('0x9')]||_0x22ee('0xa');this[_0x22ee('0xb')]=_0x15929b[_0x22ee('0xb')];this[_0x22ee('0xc')]={};this[_0x22ee('0xd')]=0x0;this['md5']='';this[_0x22ee('0xe')]();this[_0x22ee('0xf')]();}MailQueue[_0x22ee('0x10')][_0x22ee('0xe')]=function(){var _0x5e29c8=this[_0x22ee('0xc')][_0x22ee('0x11')];this[_0x22ee('0xc')]=_[_0x22ee('0x12')](this[_0x22ee('0xb')],'id');this[_0x22ee('0xc')][_0x22ee('0x11')]=_0x5e29c8;};MailQueue[_0x22ee('0x10')][_0x22ee('0xf')]=function(){this['loggedIn']=0x0;this['paused']=0x0;for(var _0x4edea9=0x0;_0x4edea9=0x0?this['available']:0x0;var _0x36fc10={'id':this['id'],'available':this[_0x22ee('0x18')],'loggedIn':this[_0x22ee('0x15')],'name':this['name'],'paused':this[_0x22ee('0x17')],'waiting':this[_0x22ee('0xd')]};var _0x7a10b1=md5(JSON['stringify'](_0x36fc10));if(this[_0x22ee('0x1')]!==_0x7a10b1){this[_0x22ee('0x1')]=_0x7a10b1;io['to'](util[_0x22ee('0x19')](_0x22ee('0x1a'),_0x36fc10[_0x22ee('0x7')]))[_0x22ee('0x1b')](_0x22ee('0x1c'),_0x36fc10);}};module[_0x22ee('0x1d')]=MailQueue; \ No newline at end of file