Built motion from commit (unavailable).|2.5.2
[motion2.git] / server / services / routing / server / applications / queue.js
index 1c34718..a6769b0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xaa88=['YYYY-MM-DD\x20HH:mm:ss','contact','list','channel','upperFirst','InteractionId','interaction','message','chat','WebsiteId','info','name','QueueReport','create','error','create\x20queue\x20report','waiting','accepted','update','catch','update\x20queue\x20report','toLowerCase','consequence','[%s][QUEUE]\x20%s','join','Queues','timeout','atimeout','qtimeout','rules','end','close','stop','complete','next','rrmemory','beepall','[%s][QUEUE]\x20queue\x20not\x20found\x20%s','log','validate','lodash','util','seq-queue','ioredis','../../../../config/environment','../../../../config/logger','routing','./strategy','redis','localhost','queue_id','account','queue','joinAt','emit','clone','format','pick','%s:queue:%s','%s_queue_waiting_interaction:%s','save','remove','../../rpc/openchannelQueueReport','../../rpc/mailQueueReport','../../rpc/faxQueueReport','number','body','from'];(function(_0x20388f,_0x5921de){var _0x96dbcb=function(_0x2372f7){while(--_0x2372f7){_0x20388f['push'](_0x20388f['shift']());}};_0x96dbcb(++_0x5921de);}(_0xaa88,0x137));var _0x8aa8=function(_0x9fd887,_0x47f76c){_0x9fd887=_0x9fd887-0x0;var _0x1a54ab=_0xaa88[_0x9fd887];return _0x1a54ab;};'use strict';var schema=require(_0x8aa8('0x0'));var _=require(_0x8aa8('0x1'));var util=require(_0x8aa8('0x2'));var seqqueue=require(_0x8aa8('0x3'));var moment=require('moment');var Redis=require(_0x8aa8('0x4'));var config=require(_0x8aa8('0x5'));var logger=require(_0x8aa8('0x6'))(_0x8aa8('0x7'));var strategy=require(_0x8aa8('0x8'));config[_0x8aa8('0x9')]=_['defaults'](config['redis'],{'host':_0x8aa8('0xa'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x8aa8('0x9')]));var attributes=['id',_0x8aa8('0xb'),_0x8aa8('0xc'),_0x8aa8('0xd'),'from',_0x8aa8('0xe')];function emit(_0x2d974c,_0x224f25,_0x5c94d4){io['to'](_0x2d974c)[_0x8aa8('0xf')](_0x224f25,_0x5c94d4);}function emitChannelQueueInteraction(_0x9f78f5,_0x357e05,_0x33cc5c,_0x583688,_0x3f8100,_0x30c114,_0x50787d,_0x370b25){var _0xa691d6=_[_0x8aa8('0x10')](_0x33cc5c);_0xa691d6['queue_id']=_0x370b25;_0xa691d6[_0x8aa8('0xd')]=_0x357e05;_0xa691d6[_0x8aa8('0xc')]=_0x583688;_0xa691d6['id']=_0x3f8100;if(_0x30c114){_0x50787d[util[_0x8aa8('0x11')]('%sQueuesWaitingInteractions',_0x9f78f5)][_0x3f8100]=_[_0x8aa8('0x12')](_0xa691d6,attributes);}else{delete _0x50787d[util['format']('%sQueuesWaitingInteractions',_0x9f78f5)][_0x3f8100];}emit(util[_0x8aa8('0x11')](_0x8aa8('0x13'),_0x9f78f5,_0x357e05),util[_0x8aa8('0x11')](_0x8aa8('0x14'),_0x9f78f5,_0x30c114?_0x8aa8('0x15'):_0x8aa8('0x16')),_[_0x8aa8('0x12')](_0xa691d6,attributes));}var rpc={'openchannelQueueReport':require(_0x8aa8('0x17')),'mailQueueReport':require(_0x8aa8('0x18')),'chatQueueReport':require('../../rpc/chatQueueReport'),'smsQueueReport':require('../../rpc/smsQueueReport'),'faxQueueReport':require(_0x8aa8('0x19'))};var queue=schema({'name':{'type':'string','required':!![],'message':'name\x20is\x20a\x20string\x20and\x20it\x20is\x20required'},'timeout':{'type':_0x8aa8('0x1a'),'message':'timeout\x20is\x20a\x20number'}});function startRouting(_0x438198,_0x41092b,_0x2a9f56,_0x2d5c1b){if(_0x438198&&_0x41092b&&_0x2a9f56){_0x41092b['waiting']+=0x1;var _0xcc2c19={'uniqueid':_0x438198,'from':_0x2a9f56[_0x8aa8('0x1b')]?_0x2a9f56[_0x8aa8('0x1b')][_0x8aa8('0x1c')]:'','joinAt':moment()[_0x8aa8('0x11')](_0x8aa8('0x1d')),'ContactId':_0x2a9f56['contact']?_0x2a9f56[_0x8aa8('0x1e')]['id']:null,'ListId':_0x2a9f56['list']?_0x2a9f56[_0x8aa8('0x1f')]['id']:null};_0xcc2c19[_['upperFirst'](_0x2a9f56[_0x8aa8('0x20')])+'QueueId']=_0x41092b['id']||null;_0xcc2c19[_[_0x8aa8('0x21')](_0x2a9f56[_0x8aa8('0x20')])+_0x8aa8('0x22')]=_0x2a9f56['interaction']?_0x2a9f56[_0x8aa8('0x23')]['id']:null;_0xcc2c19[_[_0x8aa8('0x21')](_0x2a9f56[_0x8aa8('0x20')])+'MessageId']=_0x2a9f56['message']?_0x2a9f56[_0x8aa8('0x24')]['id']:null;_0xcc2c19[_[_0x8aa8('0x21')](_0x2a9f56[_0x8aa8('0x20')])+(_0x2a9f56[_0x8aa8('0x20')]!==_0x8aa8('0x25')?'AccountId':_0x8aa8('0x26'))]=_0x2a9f56['account']?_0x2a9f56[_0x8aa8('0xc')]['id']:null;logger[_0x8aa8('0x27')](util[_0x8aa8('0x11')]('[%s][START:QUEUE][NAME:%s]',_0x438198,_0x41092b['name']));emitChannelQueueInteraction(_0x2a9f56[_0x8aa8('0x20')],_0x41092b['name'],_0xcc2c19,_0x2a9f56[_0x8aa8('0xc')][_0x8aa8('0x28')],_0x2a9f56[_0x8aa8('0x24')]['id'],!![],_0x2d5c1b,_0x41092b['id']);if(rpc[_0x2a9f56[_0x8aa8('0x20')]+_0x8aa8('0x29')]){return rpc[_0x2a9f56['channel']+_0x8aa8('0x29')][_0x8aa8('0x2a')](_0xcc2c19)['catch'](function(_0x99f74e){logger[_0x8aa8('0x2b')](_0x8aa8('0x2c'));});}}}function stopRouting(_0x5b6d5d,_0x28182b,_0x3a0dce,_0x23a37c){if(_0x5b6d5d&&_0x28182b){_0x28182b[_0x8aa8('0x2d')]-=0x1;var _0x1313f8={'leaveAt':moment()[_0x8aa8('0x11')](_0x8aa8('0x1d')),'acceptAt':moment()[_0x8aa8('0x11')](_0x8aa8('0x1d')),'reason':_0x8aa8('0x2e')};logger[_0x8aa8('0x27')](util['format']('[%s][STOP:QUEUE][NAME:%s]',_0x5b6d5d,_0x28182b[_0x8aa8('0x28')]));emitChannelQueueInteraction(_0x3a0dce[_0x8aa8('0x20')],_0x28182b[_0x8aa8('0x28')],_0x3a0dce[_0x8aa8('0x1b')],_0x3a0dce[_0x8aa8('0xc')][_0x8aa8('0x28')],_0x3a0dce['message']['id'],![],_0x23a37c,_0x28182b['id']);if(rpc[_0x3a0dce['channel']+_0x8aa8('0x29')]){return rpc[_0x3a0dce['channel']+_0x8aa8('0x29')][_0x8aa8('0x2f')](_0x5b6d5d,_0x1313f8)[_0x8aa8('0x30')](function(_0x59041c){logger[_0x8aa8('0x2b')](_0x8aa8('0x31'));});}}}function endRouting(_0x231e29,_0x5c28fa,_0x526779,_0x22b511){if(_0x231e29&&_0x5c28fa){_0x5c28fa[_0x8aa8('0x2d')]-=0x1;var _0x52f87d={'leaveAt':moment()[_0x8aa8('0x11')](_0x8aa8('0x1d')),'exitAt':moment()['format'](_0x8aa8('0x1d')),'reason':'timeout'};logger['info'](util[_0x8aa8('0x11')]('[%s][END:QUEUE][NAME:%s]',_0x231e29,_0x5c28fa[_0x8aa8('0x28')]));emitChannelQueueInteraction(_0x526779[_0x8aa8('0x20')],_0x5c28fa[_0x8aa8('0x28')],_0x526779[_0x8aa8('0x1b')],_0x526779['account'][_0x8aa8('0x28')],_0x526779[_0x8aa8('0x24')]['id'],![],_0x22b511);if(rpc[_0x526779['channel']+_0x8aa8('0x29')]){return rpc[_0x526779[_0x8aa8('0x20')]+'QueueReport'][_0x8aa8('0x2f')](_0x231e29,_0x52f87d)[_0x8aa8('0x30')](function(_0x103a74){logger[_0x8aa8('0x2b')](_0x8aa8('0x31'));});}}}function handleFindQueue(_0xea42cb){return function(_0x46711b){return _0x46711b[_0x8aa8('0x28')][_0x8aa8('0x32')]()===_0xea42cb[_0x8aa8('0x32')]();};}exports[_0x8aa8('0x33')]=function(_0x36c48b,_0x17c730,_0x36325f,_0x335953){return function(_0x21b0b6){try{var _0x549fb5={'name':_0x17c730[0x0],'timeout':_0x17c730[0x1]};var _0x1aade0=queue['validate'](_0x549fb5,{'typecast':!![]});if(_0x1aade0['length']){logger['error'](_0x8aa8('0x34'),_0x36c48b,_['map'](_0x1aade0,'message')[_0x8aa8('0x35')](',\x20'));_0x21b0b6['stop']();}else{var _0x1ddf7f=_['find'](_0x36325f[_0x335953['channel']+_0x8aa8('0x36')],handleFindQueue(_0x549fb5[_0x8aa8('0x28')]));if(_0x1ddf7f){startRouting(_0x36c48b,_0x1ddf7f,_0x335953,_0x36325f);var _0xb98d2e=(_0x1ddf7f[_0x8aa8('0x37')]||0xa)*0x3e8;var _0x1f841f=(_0x549fb5[_0x8aa8('0x37')]||0x14)*0x3e8;var _0x9618e3,_0x4e286a;if(_0xb98d2e>_0x1f841f){_0x1f841f=_0xb98d2e;}var _0x32289d=seqqueue['createQueue'](_0xb98d2e);_0x32289d['id']=_0x36c48b;_0x32289d[_0x8aa8('0x38')]=_0xb98d2e;_0x32289d[_0x8aa8('0x39')]=_0x1f841f;_0x32289d[_0x8aa8('0x20')]=_0x335953[_0x8aa8('0x20')];_0x36325f[_0x8aa8('0x3a')][_0x36c48b]['on'](_0x8aa8('0x3b'),function(){logger['info']('[%s][QUEUE]\x20ROUTING\x20STOPPED',_0x36c48b);stopRouting(_0x36c48b,_0x1ddf7f,_0x335953,_0x36325f);clearTimeout(_0x9618e3);_0x9618e3=undefined;_0x32289d[_0x8aa8('0x3c')](!![]);if(_0x36325f[_0x8aa8('0x3a')][_0x36c48b]){delete _0x36325f['rules'][_0x36c48b];}_0x21b0b6[_0x8aa8('0x3d')]();});_0x36325f[_0x8aa8('0x3a')][_0x36c48b]['on'](_0x8aa8('0x3e'),function(){if(_0x36325f['rules'][_0x36c48b]){delete _0x36325f['rules'][_0x36c48b];}});_0x9618e3=setTimeout(function(){logger['info']('[%s][QUEUE]\x20APPLICATION\x20END',_0x36c48b);endRouting(_0x36c48b,_0x1ddf7f,_0x335953,_0x36325f);clearTimeout(_0x9618e3);_0x32289d[_0x8aa8('0x3c')](!![]);_0x21b0b6[_0x8aa8('0x3f')]();},_0x1f841f);switch(_0x1ddf7f['strategy']){case _0x8aa8('0x40'):strategy[_0x8aa8('0x40')](_0x32289d,_0x1ddf7f,_0x36325f,_0x335953);break;default:strategy[_0x8aa8('0x41')](_0x32289d,_0x1ddf7f,_0x36325f,_0x335953);}}else{logger[_0x8aa8('0x2b')](_0x8aa8('0x42'),_0x36c48b,_0x549fb5[_0x8aa8('0x28')]);_0x21b0b6['stop']();}}}catch(_0x4da826){console[_0x8aa8('0x43')](_0x4da826);logger['error'](_0x8aa8('0x34'),_0x36c48b,_0x4da826['stack']);_0x21b0b6[_0x8aa8('0x3d')]();}};};
\ No newline at end of file
+var _0x9c44=['[%s][END:QUEUE][NAME:%s]','toLowerCase','consequence','validate','length','[%s][QUEUE]\x20%s','join','stop','find','Queues','atimeout','rules','end','close','complete','next','strategy','rrmemory','beepall','log','stack','util','seq-queue','moment','ioredis','../../../../config/environment','../../../../config/logger','redis','localhost','socket.io-emitter','queue_id','queue','from','joinAt','emit','clone','account','format','%sQueuesWaitingInteractions','pick','%s:queue:%s','%s_queue_waiting_interaction:%s','save','remove','../../rpc/openchannelQueueReport','../../rpc/chatQueueReport','../../rpc/smsQueueReport','string','name\x20is\x20a\x20string\x20and\x20it\x20is\x20required','number','waiting','body','YYYY-MM-DD\x20HH:mm:ss','list','QueueId','upperFirst','channel','InteractionId','message','AccountId','info','name','QueueReport','create','create\x20queue\x20report','[%s][STOP:QUEUE][NAME:%s]','update','catch','error','update\x20queue\x20report','timeout'];(function(_0x27d8bc,_0x19e010){var _0x4b04cb=function(_0x524568){while(--_0x524568){_0x27d8bc['push'](_0x27d8bc['shift']());}};_0x4b04cb(++_0x19e010);}(_0x9c44,0x178));var _0x49c4=function(_0x3ff085,_0x27c92e){_0x3ff085=_0x3ff085-0x0;var _0x2b68c3=_0x9c44[_0x3ff085];return _0x2b68c3;};'use strict';var schema=require('validate');var _=require('lodash');var util=require(_0x49c4('0x0'));var seqqueue=require(_0x49c4('0x1'));var moment=require(_0x49c4('0x2'));var Redis=require(_0x49c4('0x3'));var config=require(_0x49c4('0x4'));var logger=require(_0x49c4('0x5'))('routing');var strategy=require('./strategy');config[_0x49c4('0x6')]=_['defaults'](config[_0x49c4('0x6')],{'host':_0x49c4('0x7'),'port':0x18eb});var io=require(_0x49c4('0x8'))(new Redis(config[_0x49c4('0x6')]));var attributes=['id',_0x49c4('0x9'),'account',_0x49c4('0xa'),_0x49c4('0xb'),_0x49c4('0xc')];function emit(_0x4487ca,_0x4c7d3a,_0x5ab4a3){io['to'](_0x4487ca)[_0x49c4('0xd')](_0x4c7d3a,_0x5ab4a3);}function emitChannelQueueInteraction(_0x313e73,_0x58cad7,_0xb611a1,_0x459d09,_0x4adb3c,_0x536d42,_0x1d19bf,_0x6d1b08){var _0x5487cd=_[_0x49c4('0xe')](_0xb611a1);_0x5487cd[_0x49c4('0x9')]=_0x6d1b08;_0x5487cd['queue']=_0x58cad7;_0x5487cd[_0x49c4('0xf')]=_0x459d09;_0x5487cd['id']=_0x4adb3c;if(_0x536d42){_0x1d19bf[util[_0x49c4('0x10')](_0x49c4('0x11'),_0x313e73)][_0x4adb3c]=_[_0x49c4('0x12')](_0x5487cd,attributes);}else{delete _0x1d19bf[util[_0x49c4('0x10')](_0x49c4('0x11'),_0x313e73)][_0x4adb3c];}emit(util[_0x49c4('0x10')](_0x49c4('0x13'),_0x313e73,_0x58cad7),util['format'](_0x49c4('0x14'),_0x313e73,_0x536d42?_0x49c4('0x15'):_0x49c4('0x16')),_[_0x49c4('0x12')](_0x5487cd,attributes));}var rpc={'openchannelQueueReport':require(_0x49c4('0x17')),'mailQueueReport':require('../../rpc/mailQueueReport'),'chatQueueReport':require(_0x49c4('0x18')),'smsQueueReport':require(_0x49c4('0x19')),'faxQueueReport':require('../../rpc/faxQueueReport'),'whatsappQueueReport':require('../../rpc/whatsappQueueReport')};var queue=schema({'name':{'type':_0x49c4('0x1a'),'required':!![],'message':_0x49c4('0x1b')},'timeout':{'type':_0x49c4('0x1c'),'message':'timeout\x20is\x20a\x20number'}});function startRouting(_0x24856d,_0x50b151,_0x2cbd50,_0x1806c2){if(_0x24856d&&_0x50b151&&_0x2cbd50){_0x50b151[_0x49c4('0x1d')]+=0x1;var _0x291526={'uniqueid':_0x24856d,'from':_0x2cbd50[_0x49c4('0x1e')]?_0x2cbd50[_0x49c4('0x1e')][_0x49c4('0xb')]:'','joinAt':moment()[_0x49c4('0x10')](_0x49c4('0x1f')),'ContactId':_0x2cbd50['contact']?_0x2cbd50['contact']['id']:null,'ListId':_0x2cbd50['list']?_0x2cbd50[_0x49c4('0x20')]['id']:null};_0x291526[_['upperFirst'](_0x2cbd50['channel'])+_0x49c4('0x21')]=_0x50b151['id']||null;_0x291526[_[_0x49c4('0x22')](_0x2cbd50[_0x49c4('0x23')])+_0x49c4('0x24')]=_0x2cbd50['interaction']?_0x2cbd50['interaction']['id']:null;_0x291526[_[_0x49c4('0x22')](_0x2cbd50[_0x49c4('0x23')])+'MessageId']=_0x2cbd50[_0x49c4('0x25')]?_0x2cbd50[_0x49c4('0x25')]['id']:null;_0x291526[_[_0x49c4('0x22')](_0x2cbd50[_0x49c4('0x23')])+(_0x2cbd50['channel']!=='chat'?_0x49c4('0x26'):'WebsiteId')]=_0x2cbd50[_0x49c4('0xf')]?_0x2cbd50[_0x49c4('0xf')]['id']:null;logger[_0x49c4('0x27')](util[_0x49c4('0x10')]('[%s][START:QUEUE][NAME:%s]',_0x24856d,_0x50b151[_0x49c4('0x28')]));emitChannelQueueInteraction(_0x2cbd50[_0x49c4('0x23')],_0x50b151[_0x49c4('0x28')],_0x291526,_0x2cbd50[_0x49c4('0xf')][_0x49c4('0x28')],_0x2cbd50[_0x49c4('0x25')]['id'],!![],_0x1806c2,_0x50b151['id']);if(rpc[_0x2cbd50[_0x49c4('0x23')]+_0x49c4('0x29')]){return rpc[_0x2cbd50[_0x49c4('0x23')]+_0x49c4('0x29')][_0x49c4('0x2a')](_0x291526)['catch'](function(_0x4f4495){logger['error'](_0x49c4('0x2b'));});}}}function stopRouting(_0x7ee704,_0x1eb035,_0x27e467,_0x28eb47){if(_0x7ee704&&_0x1eb035){_0x1eb035['waiting']-=0x1;var _0x38ad77={'leaveAt':moment()[_0x49c4('0x10')](_0x49c4('0x1f')),'acceptAt':moment()[_0x49c4('0x10')]('YYYY-MM-DD\x20HH:mm:ss'),'reason':'accepted'};logger[_0x49c4('0x27')](util[_0x49c4('0x10')](_0x49c4('0x2c'),_0x7ee704,_0x1eb035[_0x49c4('0x28')]));emitChannelQueueInteraction(_0x27e467[_0x49c4('0x23')],_0x1eb035['name'],_0x27e467[_0x49c4('0x1e')],_0x27e467[_0x49c4('0xf')][_0x49c4('0x28')],_0x27e467['message']['id'],![],_0x28eb47,_0x1eb035['id']);if(rpc[_0x27e467['channel']+_0x49c4('0x29')]){return rpc[_0x27e467[_0x49c4('0x23')]+_0x49c4('0x29')][_0x49c4('0x2d')](_0x7ee704,_0x38ad77)[_0x49c4('0x2e')](function(_0x2cf897){logger[_0x49c4('0x2f')](_0x49c4('0x30'));});}}}function endRouting(_0x3209cd,_0x4e0209,_0x2d34ca,_0x5b96df){if(_0x3209cd&&_0x4e0209){_0x4e0209[_0x49c4('0x1d')]-=0x1;var _0x349791={'leaveAt':moment()[_0x49c4('0x10')](_0x49c4('0x1f')),'exitAt':moment()['format'](_0x49c4('0x1f')),'reason':_0x49c4('0x31')};logger[_0x49c4('0x27')](util['format'](_0x49c4('0x32'),_0x3209cd,_0x4e0209[_0x49c4('0x28')]));emitChannelQueueInteraction(_0x2d34ca[_0x49c4('0x23')],_0x4e0209[_0x49c4('0x28')],_0x2d34ca[_0x49c4('0x1e')],_0x2d34ca[_0x49c4('0xf')][_0x49c4('0x28')],_0x2d34ca[_0x49c4('0x25')]['id'],![],_0x5b96df);if(rpc[_0x2d34ca[_0x49c4('0x23')]+_0x49c4('0x29')]){return rpc[_0x2d34ca[_0x49c4('0x23')]+'QueueReport'][_0x49c4('0x2d')](_0x3209cd,_0x349791)[_0x49c4('0x2e')](function(_0x32b172){logger[_0x49c4('0x2f')](_0x49c4('0x30'));});}}}function handleFindQueue(_0x29dd5d){return function(_0x1be62d){return _0x1be62d[_0x49c4('0x28')][_0x49c4('0x33')]()===_0x29dd5d[_0x49c4('0x33')]();};}exports[_0x49c4('0x34')]=function(_0xa3d59e,_0x326142,_0x4e38bc,_0x212366){return function(_0x49829e){try{var _0x104efb={'name':_0x326142[0x0],'timeout':_0x326142[0x1]};var _0x4915bc=queue[_0x49c4('0x35')](_0x104efb,{'typecast':!![]});if(_0x4915bc[_0x49c4('0x36')]){logger[_0x49c4('0x2f')](_0x49c4('0x37'),_0xa3d59e,_['map'](_0x4915bc,'message')[_0x49c4('0x38')](',\x20'));_0x49829e[_0x49c4('0x39')]();}else{var _0x38349b=_[_0x49c4('0x3a')](_0x4e38bc[_0x212366['channel']+_0x49c4('0x3b')],handleFindQueue(_0x104efb[_0x49c4('0x28')]));if(_0x38349b){startRouting(_0xa3d59e,_0x38349b,_0x212366,_0x4e38bc);var _0x2ccd47=(_0x38349b[_0x49c4('0x31')]||0xa)*0x3e8;var _0x81a674=(_0x104efb[_0x49c4('0x31')]||0x14)*0x3e8;var _0x1a9593,_0x3351c1;if(_0x2ccd47>_0x81a674){_0x81a674=_0x2ccd47;}var _0x3c4a1d=seqqueue['createQueue'](_0x2ccd47);_0x3c4a1d['id']=_0xa3d59e;_0x3c4a1d[_0x49c4('0x3c')]=_0x2ccd47;_0x3c4a1d['qtimeout']=_0x81a674;_0x3c4a1d[_0x49c4('0x23')]=_0x212366[_0x49c4('0x23')];_0x4e38bc[_0x49c4('0x3d')][_0xa3d59e]['on'](_0x49c4('0x3e'),function(){logger[_0x49c4('0x27')]('[%s][QUEUE]\x20ROUTING\x20STOPPED',_0xa3d59e);stopRouting(_0xa3d59e,_0x38349b,_0x212366,_0x4e38bc);clearTimeout(_0x1a9593);_0x1a9593=undefined;_0x3c4a1d[_0x49c4('0x3f')](!![]);if(_0x4e38bc[_0x49c4('0x3d')][_0xa3d59e]){delete _0x4e38bc[_0x49c4('0x3d')][_0xa3d59e];}_0x49829e[_0x49c4('0x39')]();});_0x4e38bc[_0x49c4('0x3d')][_0xa3d59e]['on'](_0x49c4('0x40'),function(){if(_0x4e38bc[_0x49c4('0x3d')][_0xa3d59e]){delete _0x4e38bc['rules'][_0xa3d59e];}});_0x1a9593=setTimeout(function(){logger[_0x49c4('0x27')]('[%s][QUEUE]\x20APPLICATION\x20END',_0xa3d59e);endRouting(_0xa3d59e,_0x38349b,_0x212366,_0x4e38bc);clearTimeout(_0x1a9593);_0x3c4a1d[_0x49c4('0x3f')](!![]);_0x49829e[_0x49c4('0x41')]();},_0x81a674);switch(_0x38349b[_0x49c4('0x42')]){case _0x49c4('0x43'):strategy[_0x49c4('0x43')](_0x3c4a1d,_0x38349b,_0x4e38bc,_0x212366);break;default:strategy[_0x49c4('0x44')](_0x3c4a1d,_0x38349b,_0x4e38bc,_0x212366);}}else{logger[_0x49c4('0x2f')]('[%s][QUEUE]\x20queue\x20not\x20found\x20%s',_0xa3d59e,_0x104efb[_0x49c4('0x28')]);_0x49829e[_0x49c4('0x39')]();}}}catch(_0x4a5c34){console[_0x49c4('0x45')](_0x4a5c34);logger[_0x49c4('0x2f')](_0x49c4('0x37'),_0xa3d59e,_0x4a5c34[_0x49c4('0x46')]);_0x49829e['stop']();}};};
\ No newline at end of file