Built motion from commit da617fac.|2.6.6
[motion2.git] / server / services / routing / server / applications / queue.js
index 2f99491..7e4ee21 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x21bb=['pick','%sQueuesWaitingInteractions','%s:queue:%s','%s_queue_waiting_interaction:%s','remove','../../rpc/openchannelQueueReport','../../rpc/smsQueueReport','../../rpc/whatsappQueueReport','string','name\x20is\x20a\x20string\x20and\x20it\x20is\x20required','number','timeout\x20is\x20a\x20number','body','contact','list','channel','upperFirst','InteractionId','interaction','MessageId','message','chat','AccountId','info','[%s][START:QUEUE][NAME:%s]','name','QueueReport','create','catch','error','create\x20queue\x20report','YYYY-MM-DD\x20HH:mm:ss','accepted','[%s][STOP:QUEUE][NAME:%s]','update','update\x20queue\x20report','waiting','timeout','[%s][END:QUEUE][NAME:%s]','toLowerCase','consequence','length','[%s][QUEUE]\x20%s','map','stop','find','createQueue','atimeout','qtimeout','rules','end','close','complete','strategy','rrmemory','beepall','[%s][QUEUE]\x20queue\x20not\x20found\x20%s','log','stack','lodash','util','seq-queue','ioredis','../../../../config/environment','routing','./strategy','redis','defaults','localhost','queue_id','account','from','joinAt','emit','clone','format'];(function(_0x3203a1,_0x46c498){var _0x24215e=function(_0x4ffab0){while(--_0x4ffab0){_0x3203a1['push'](_0x3203a1['shift']());}};_0x24215e(++_0x46c498);}(_0x21bb,0x16b));var _0xb21b=function(_0x5143ba,_0x256eb6){_0x5143ba=_0x5143ba-0x0;var _0x441e77=_0x21bb[_0x5143ba];return _0x441e77;};'use strict';var schema=require('validate');var _=require(_0xb21b('0x0'));var util=require(_0xb21b('0x1'));var seqqueue=require(_0xb21b('0x2'));var moment=require('moment');var Redis=require(_0xb21b('0x3'));var config=require(_0xb21b('0x4'));var logger=require('../../../../config/logger')(_0xb21b('0x5'));var strategy=require(_0xb21b('0x6'));config[_0xb21b('0x7')]=_[_0xb21b('0x8')](config[_0xb21b('0x7')],{'host':_0xb21b('0x9'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config['redis']));var attributes=['id',_0xb21b('0xa'),_0xb21b('0xb'),'queue',_0xb21b('0xc'),_0xb21b('0xd')];function emit(_0xbebf51,_0x287293,_0x40c58b){io['to'](_0xbebf51)[_0xb21b('0xe')](_0x287293,_0x40c58b);}function emitChannelQueueInteraction(_0x557cab,_0xa6037c,_0x408a5,_0x52f1ff,_0x3a77cc,_0x95a184,_0x4b7474,_0x43f51b){var _0x4d5e87=_[_0xb21b('0xf')](_0x408a5);_0x4d5e87[_0xb21b('0xa')]=_0x43f51b;_0x4d5e87['queue']=_0xa6037c;_0x4d5e87[_0xb21b('0xb')]=_0x52f1ff;_0x4d5e87['id']=_0x3a77cc;if(_0x95a184){_0x4b7474[util[_0xb21b('0x10')]('%sQueuesWaitingInteractions',_0x557cab)][_0x3a77cc]=_[_0xb21b('0x11')](_0x4d5e87,attributes);}else{delete _0x4b7474[util[_0xb21b('0x10')](_0xb21b('0x12'),_0x557cab)][_0x3a77cc];}emit(util[_0xb21b('0x10')](_0xb21b('0x13'),_0x557cab,_0xa6037c),util[_0xb21b('0x10')](_0xb21b('0x14'),_0x557cab,_0x95a184?'save':_0xb21b('0x15')),_[_0xb21b('0x11')](_0x4d5e87,attributes));}var rpc={'openchannelQueueReport':require(_0xb21b('0x16')),'mailQueueReport':require('../../rpc/mailQueueReport'),'chatQueueReport':require('../../rpc/chatQueueReport'),'smsQueueReport':require(_0xb21b('0x17')),'faxQueueReport':require('../../rpc/faxQueueReport'),'whatsappQueueReport':require(_0xb21b('0x18'))};var queue=schema({'name':{'type':_0xb21b('0x19'),'required':!![],'message':_0xb21b('0x1a')},'timeout':{'type':_0xb21b('0x1b'),'message':_0xb21b('0x1c')}});function startRouting(_0x253303,_0x553cb7,_0x55337a,_0x187aa4){if(_0x253303&&_0x553cb7&&_0x55337a){_0x553cb7['waiting']+=0x1;var _0x265d89={'uniqueid':_0x253303,'from':_0x55337a[_0xb21b('0x1d')]?_0x55337a['body'][_0xb21b('0xc')]:'','joinAt':moment()[_0xb21b('0x10')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x55337a[_0xb21b('0x1e')]?_0x55337a[_0xb21b('0x1e')]['id']:null,'ListId':_0x55337a[_0xb21b('0x1f')]?_0x55337a[_0xb21b('0x1f')]['id']:null};_0x265d89[_['upperFirst'](_0x55337a[_0xb21b('0x20')])+'QueueId']=_0x553cb7['id']||null;_0x265d89[_[_0xb21b('0x21')](_0x55337a[_0xb21b('0x20')])+_0xb21b('0x22')]=_0x55337a[_0xb21b('0x23')]?_0x55337a['interaction']['id']:null;_0x265d89[_[_0xb21b('0x21')](_0x55337a[_0xb21b('0x20')])+_0xb21b('0x24')]=_0x55337a['message']?_0x55337a[_0xb21b('0x25')]['id']:null;_0x265d89[_['upperFirst'](_0x55337a[_0xb21b('0x20')])+(_0x55337a[_0xb21b('0x20')]!==_0xb21b('0x26')?_0xb21b('0x27'):'WebsiteId')]=_0x55337a['account']?_0x55337a[_0xb21b('0xb')]['id']:null;logger[_0xb21b('0x28')](util[_0xb21b('0x10')](_0xb21b('0x29'),_0x253303,_0x553cb7[_0xb21b('0x2a')]));emitChannelQueueInteraction(_0x55337a[_0xb21b('0x20')],_0x553cb7[_0xb21b('0x2a')],_0x265d89,_0x55337a[_0xb21b('0xb')][_0xb21b('0x2a')],_0x55337a[_0xb21b('0x25')]['id'],!![],_0x187aa4,_0x553cb7['id']);if(rpc[_0x55337a[_0xb21b('0x20')]+_0xb21b('0x2b')]){return rpc[_0x55337a['channel']+_0xb21b('0x2b')][_0xb21b('0x2c')](_0x265d89)[_0xb21b('0x2d')](function(_0x2cf4ab){logger[_0xb21b('0x2e')](_0xb21b('0x2f'));});}}}function stopRouting(_0x4b091b,_0x256913,_0x142aec,_0x466957){if(_0x4b091b&&_0x256913){_0x256913['waiting']-=0x1;var _0x1ea3c5={'leaveAt':moment()[_0xb21b('0x10')](_0xb21b('0x30')),'acceptAt':moment()[_0xb21b('0x10')](_0xb21b('0x30')),'reason':_0xb21b('0x31')};logger['info'](util[_0xb21b('0x10')](_0xb21b('0x32'),_0x4b091b,_0x256913[_0xb21b('0x2a')]));emitChannelQueueInteraction(_0x142aec[_0xb21b('0x20')],_0x256913[_0xb21b('0x2a')],_0x142aec[_0xb21b('0x1d')],_0x142aec[_0xb21b('0xb')][_0xb21b('0x2a')],_0x142aec[_0xb21b('0x25')]['id'],![],_0x466957,_0x256913['id']);if(rpc[_0x142aec['channel']+_0xb21b('0x2b')]){return rpc[_0x142aec[_0xb21b('0x20')]+'QueueReport'][_0xb21b('0x33')](_0x4b091b,_0x1ea3c5)[_0xb21b('0x2d')](function(_0x81f681){logger[_0xb21b('0x2e')](_0xb21b('0x34'));});}}}function endRouting(_0xd188aa,_0x3cc03d,_0x55fe34,_0x210911){if(_0xd188aa&&_0x3cc03d){_0x3cc03d[_0xb21b('0x35')]-=0x1;var _0x439903={'leaveAt':moment()[_0xb21b('0x10')]('YYYY-MM-DD\x20HH:mm:ss'),'exitAt':moment()[_0xb21b('0x10')](_0xb21b('0x30')),'reason':_0xb21b('0x36')};logger[_0xb21b('0x28')](util[_0xb21b('0x10')](_0xb21b('0x37'),_0xd188aa,_0x3cc03d[_0xb21b('0x2a')]));emitChannelQueueInteraction(_0x55fe34['channel'],_0x3cc03d[_0xb21b('0x2a')],_0x55fe34[_0xb21b('0x1d')],_0x55fe34[_0xb21b('0xb')][_0xb21b('0x2a')],_0x55fe34[_0xb21b('0x25')]['id'],![],_0x210911);if(rpc[_0x55fe34[_0xb21b('0x20')]+_0xb21b('0x2b')]){return rpc[_0x55fe34['channel']+'QueueReport'][_0xb21b('0x33')](_0xd188aa,_0x439903)[_0xb21b('0x2d')](function(_0x664693){logger[_0xb21b('0x2e')](_0xb21b('0x34'));});}}}function handleFindQueue(_0x178d85){return function(_0x5b2ec7){return _0x5b2ec7[_0xb21b('0x2a')][_0xb21b('0x38')]()===_0x178d85[_0xb21b('0x38')]();};}exports[_0xb21b('0x39')]=function(_0x3506e5,_0x128ab7,_0x2a2830,_0x2e6c80){return function(_0x2980a5){try{var _0x5986f0={'name':_0x128ab7[0x0],'timeout':_0x128ab7[0x1]};var _0x3b9634=queue['validate'](_0x5986f0,{'typecast':!![]});if(_0x3b9634[_0xb21b('0x3a')]){logger['error'](_0xb21b('0x3b'),_0x3506e5,_[_0xb21b('0x3c')](_0x3b9634,_0xb21b('0x25'))['join'](',\x20'));_0x2980a5[_0xb21b('0x3d')]();}else{var _0x42ee0f=_[_0xb21b('0x3e')](_0x2a2830[_0x2e6c80[_0xb21b('0x20')]+'Queues'],handleFindQueue(_0x5986f0[_0xb21b('0x2a')]));if(_0x42ee0f){startRouting(_0x3506e5,_0x42ee0f,_0x2e6c80,_0x2a2830);var _0x448824=(_0x42ee0f['timeout']||0xa)*0x3e8;var _0xf3afa5=(_0x5986f0[_0xb21b('0x36')]||0x14)*0x3e8;var _0x5a4100,_0x1365b4;if(_0x448824>_0xf3afa5){_0xf3afa5=_0x448824;}var _0x5cf9c0=seqqueue[_0xb21b('0x3f')](_0x448824);_0x5cf9c0['id']=_0x3506e5;_0x5cf9c0[_0xb21b('0x40')]=_0x448824;_0x5cf9c0[_0xb21b('0x41')]=_0xf3afa5;_0x5cf9c0['channel']=_0x2e6c80['channel'];_0x2a2830[_0xb21b('0x42')][_0x3506e5]['on'](_0xb21b('0x43'),function(){logger[_0xb21b('0x28')]('[%s][QUEUE]\x20ROUTING\x20STOPPED',_0x3506e5);stopRouting(_0x3506e5,_0x42ee0f,_0x2e6c80,_0x2a2830);clearTimeout(_0x5a4100);_0x5a4100=undefined;_0x5cf9c0[_0xb21b('0x44')](!![]);if(_0x2a2830[_0xb21b('0x42')][_0x3506e5]){delete _0x2a2830['rules'][_0x3506e5];}_0x2980a5[_0xb21b('0x3d')]();});_0x2a2830['rules'][_0x3506e5]['on'](_0xb21b('0x45'),function(){if(_0x2a2830[_0xb21b('0x42')][_0x3506e5]){delete _0x2a2830[_0xb21b('0x42')][_0x3506e5];}});_0x5a4100=setTimeout(function(){logger['info']('[%s][QUEUE]\x20APPLICATION\x20END',_0x3506e5);endRouting(_0x3506e5,_0x42ee0f,_0x2e6c80,_0x2a2830);clearTimeout(_0x5a4100);_0x5cf9c0['close'](!![]);_0x2980a5['next']();},_0xf3afa5);switch(_0x42ee0f[_0xb21b('0x46')]){case _0xb21b('0x47'):strategy[_0xb21b('0x47')](_0x5cf9c0,_0x42ee0f,_0x2a2830,_0x2e6c80);break;default:strategy[_0xb21b('0x48')](_0x5cf9c0,_0x42ee0f,_0x2a2830,_0x2e6c80);}}else{logger[_0xb21b('0x2e')](_0xb21b('0x49'),_0x3506e5,_0x5986f0['name']);_0x2980a5[_0xb21b('0x3d')]();}}}catch(_0x360641){console[_0xb21b('0x4a')](_0x360641);logger[_0xb21b('0x2e')](_0xb21b('0x3b'),_0x3506e5,_0x360641[_0xb21b('0x4b')]);_0x2980a5['stop']();}};};
\ No newline at end of file
+var _0x1f38=['complete','[%s][QUEUE]\x20APPLICATION\x20END','next','strategy','rrmemory','log','stack','lodash','util','seq-queue','moment','ioredis','../../../../config/logger','routing','redis','defaults','socket.io-emitter','queue_id','account','queue','from','joinAt','emit','format','pick','%sQueuesWaitingInteractions','%s:queue:%s','%s_queue_waiting_interaction:%s','remove','../../rpc/openchannelQueueReport','../../rpc/mailQueueReport','../../rpc/chatQueueReport','../../rpc/smsQueueReport','../../rpc/whatsappQueueReport','string','number','timeout\x20is\x20a\x20number','waiting','YYYY-MM-DD\x20HH:mm:ss','contact','list','upperFirst','channel','QueueId','InteractionId','interaction','MessageId','message','chat','WebsiteId','info','[%s][START:QUEUE][NAME:%s]','name','QueueReport','create','catch','error','create\x20queue\x20report','accepted','[%s][STOP:QUEUE][NAME:%s]','body','update','update\x20queue\x20report','[%s][END:QUEUE][NAME:%s]','toLowerCase','consequence','validate','[%s][QUEUE]\x20%s','map','stop','find','Queues','timeout','atimeout','qtimeout','rules','end','[%s][QUEUE]\x20ROUTING\x20STOPPED','close'];(function(_0x1c7ced,_0x23f7d5){var _0x1000b8=function(_0x5a994b){while(--_0x5a994b){_0x1c7ced['push'](_0x1c7ced['shift']());}};_0x1000b8(++_0x23f7d5);}(_0x1f38,0x192));var _0x81f3=function(_0x1ee358,_0x42fdfb){_0x1ee358=_0x1ee358-0x0;var _0x4d01b9=_0x1f38[_0x1ee358];return _0x4d01b9;};'use strict';var schema=require('validate');var _=require(_0x81f3('0x0'));var util=require(_0x81f3('0x1'));var seqqueue=require(_0x81f3('0x2'));var moment=require(_0x81f3('0x3'));var Redis=require(_0x81f3('0x4'));var config=require('../../../../config/environment');var logger=require(_0x81f3('0x5'))(_0x81f3('0x6'));var strategy=require('./strategy');config[_0x81f3('0x7')]=_[_0x81f3('0x8')](config[_0x81f3('0x7')],{'host':'localhost','port':0x18eb});var io=require(_0x81f3('0x9'))(new Redis(config['redis']));var attributes=['id',_0x81f3('0xa'),_0x81f3('0xb'),_0x81f3('0xc'),_0x81f3('0xd'),_0x81f3('0xe')];function emit(_0x4dd0c,_0x48ca8f,_0x13dcf7){io['to'](_0x4dd0c)[_0x81f3('0xf')](_0x48ca8f,_0x13dcf7);}function emitChannelQueueInteraction(_0x55206e,_0x544bc4,_0x5002e6,_0x263be9,_0x5084d5,_0x1402aa,_0x55d05a,_0x55044d){var _0x53b1a2=_['clone'](_0x5002e6);_0x53b1a2['queue_id']=_0x55044d;_0x53b1a2['queue']=_0x544bc4;_0x53b1a2['account']=_0x263be9;_0x53b1a2['id']=_0x5084d5;if(_0x1402aa){_0x55d05a[util[_0x81f3('0x10')]('%sQueuesWaitingInteractions',_0x55206e)][_0x5084d5]=_[_0x81f3('0x11')](_0x53b1a2,attributes);}else{delete _0x55d05a[util[_0x81f3('0x10')](_0x81f3('0x12'),_0x55206e)][_0x5084d5];}emit(util[_0x81f3('0x10')](_0x81f3('0x13'),_0x55206e,_0x544bc4),util['format'](_0x81f3('0x14'),_0x55206e,_0x1402aa?'save':_0x81f3('0x15')),_['pick'](_0x53b1a2,attributes));}var rpc={'openchannelQueueReport':require(_0x81f3('0x16')),'mailQueueReport':require(_0x81f3('0x17')),'chatQueueReport':require(_0x81f3('0x18')),'smsQueueReport':require(_0x81f3('0x19')),'faxQueueReport':require('../../rpc/faxQueueReport'),'whatsappQueueReport':require(_0x81f3('0x1a'))};var queue=schema({'name':{'type':_0x81f3('0x1b'),'required':!![],'message':'name\x20is\x20a\x20string\x20and\x20it\x20is\x20required'},'timeout':{'type':_0x81f3('0x1c'),'message':_0x81f3('0x1d')}});function startRouting(_0xbbe1ea,_0x4b8af5,_0x4a4a77,_0x2a12ea){if(_0xbbe1ea&&_0x4b8af5&&_0x4a4a77){_0x4b8af5[_0x81f3('0x1e')]+=0x1;var _0x2ddf6f={'uniqueid':_0xbbe1ea,'from':_0x4a4a77['body']?_0x4a4a77['body'][_0x81f3('0xd')]:'','joinAt':moment()['format'](_0x81f3('0x1f')),'ContactId':_0x4a4a77[_0x81f3('0x20')]?_0x4a4a77['contact']['id']:null,'ListId':_0x4a4a77[_0x81f3('0x21')]?_0x4a4a77[_0x81f3('0x21')]['id']:null};_0x2ddf6f[_[_0x81f3('0x22')](_0x4a4a77[_0x81f3('0x23')])+_0x81f3('0x24')]=_0x4b8af5['id']||null;_0x2ddf6f[_[_0x81f3('0x22')](_0x4a4a77[_0x81f3('0x23')])+_0x81f3('0x25')]=_0x4a4a77[_0x81f3('0x26')]?_0x4a4a77[_0x81f3('0x26')]['id']:null;_0x2ddf6f[_['upperFirst'](_0x4a4a77[_0x81f3('0x23')])+_0x81f3('0x27')]=_0x4a4a77['message']?_0x4a4a77[_0x81f3('0x28')]['id']:null;_0x2ddf6f[_[_0x81f3('0x22')](_0x4a4a77[_0x81f3('0x23')])+(_0x4a4a77[_0x81f3('0x23')]!==_0x81f3('0x29')?'AccountId':_0x81f3('0x2a'))]=_0x4a4a77['account']?_0x4a4a77['account']['id']:null;logger[_0x81f3('0x2b')](util['format'](_0x81f3('0x2c'),_0xbbe1ea,_0x4b8af5['name']));emitChannelQueueInteraction(_0x4a4a77[_0x81f3('0x23')],_0x4b8af5[_0x81f3('0x2d')],_0x2ddf6f,_0x4a4a77[_0x81f3('0xb')][_0x81f3('0x2d')],_0x4a4a77[_0x81f3('0x28')]['id'],!![],_0x2a12ea,_0x4b8af5['id']);if(rpc[_0x4a4a77['channel']+_0x81f3('0x2e')]){return rpc[_0x4a4a77['channel']+_0x81f3('0x2e')][_0x81f3('0x2f')](_0x2ddf6f)[_0x81f3('0x30')](function(_0x23dcce){logger[_0x81f3('0x31')](_0x81f3('0x32'));});}}}function stopRouting(_0x10c22b,_0x471e3e,_0x170c6c,_0x3183cb){if(_0x10c22b&&_0x471e3e){_0x471e3e['waiting']-=0x1;var _0x4ee300={'leaveAt':moment()['format'](_0x81f3('0x1f')),'acceptAt':moment()[_0x81f3('0x10')](_0x81f3('0x1f')),'reason':_0x81f3('0x33')};logger[_0x81f3('0x2b')](util[_0x81f3('0x10')](_0x81f3('0x34'),_0x10c22b,_0x471e3e[_0x81f3('0x2d')]));emitChannelQueueInteraction(_0x170c6c[_0x81f3('0x23')],_0x471e3e[_0x81f3('0x2d')],_0x170c6c[_0x81f3('0x35')],_0x170c6c['account']['name'],_0x170c6c[_0x81f3('0x28')]['id'],![],_0x3183cb,_0x471e3e['id']);if(rpc[_0x170c6c['channel']+'QueueReport']){return rpc[_0x170c6c[_0x81f3('0x23')]+_0x81f3('0x2e')][_0x81f3('0x36')](_0x10c22b,_0x4ee300)[_0x81f3('0x30')](function(_0x12d9ce){logger[_0x81f3('0x31')](_0x81f3('0x37'));});}}}function endRouting(_0x3a709d,_0x1d8aa3,_0x53d786,_0x311c82){if(_0x3a709d&&_0x1d8aa3){_0x1d8aa3['waiting']-=0x1;var _0x53c710={'leaveAt':moment()[_0x81f3('0x10')](_0x81f3('0x1f')),'exitAt':moment()[_0x81f3('0x10')](_0x81f3('0x1f')),'reason':'timeout'};logger[_0x81f3('0x2b')](util[_0x81f3('0x10')](_0x81f3('0x38'),_0x3a709d,_0x1d8aa3[_0x81f3('0x2d')]));emitChannelQueueInteraction(_0x53d786[_0x81f3('0x23')],_0x1d8aa3[_0x81f3('0x2d')],_0x53d786[_0x81f3('0x35')],_0x53d786[_0x81f3('0xb')]['name'],_0x53d786[_0x81f3('0x28')]['id'],![],_0x311c82);if(rpc[_0x53d786[_0x81f3('0x23')]+_0x81f3('0x2e')]){return rpc[_0x53d786[_0x81f3('0x23')]+_0x81f3('0x2e')]['update'](_0x3a709d,_0x53c710)[_0x81f3('0x30')](function(_0x2d4b52){logger[_0x81f3('0x31')](_0x81f3('0x37'));});}}}function handleFindQueue(_0x5966a7){return function(_0xece5d4){return _0xece5d4[_0x81f3('0x2d')][_0x81f3('0x39')]()===_0x5966a7[_0x81f3('0x39')]();};}exports[_0x81f3('0x3a')]=function(_0x1f1282,_0x1ee9a3,_0x43e8c2,_0x25f4b2){return function(_0x25d24f){try{var _0x4f903a={'name':_0x1ee9a3[0x0],'timeout':_0x1ee9a3[0x1]};var _0x2ada45=queue[_0x81f3('0x3b')](_0x4f903a,{'typecast':!![]});if(_0x2ada45['length']){logger[_0x81f3('0x31')](_0x81f3('0x3c'),_0x1f1282,_[_0x81f3('0x3d')](_0x2ada45,_0x81f3('0x28'))['join'](',\x20'));_0x25d24f[_0x81f3('0x3e')]();}else{var _0x16fd08=_[_0x81f3('0x3f')](_0x43e8c2[_0x25f4b2[_0x81f3('0x23')]+_0x81f3('0x40')],handleFindQueue(_0x4f903a[_0x81f3('0x2d')]));if(_0x16fd08){startRouting(_0x1f1282,_0x16fd08,_0x25f4b2,_0x43e8c2);var _0x47f140=(_0x16fd08[_0x81f3('0x41')]||0xa)*0x3e8;var _0x239238=(_0x4f903a[_0x81f3('0x41')]||0x14)*0x3e8;var _0x4cefcb,_0x4770fd;if(_0x47f140>_0x239238){_0x239238=_0x47f140;}var _0x1f9de9=seqqueue['createQueue'](_0x47f140);_0x1f9de9['id']=_0x1f1282;_0x1f9de9[_0x81f3('0x42')]=_0x47f140;_0x1f9de9[_0x81f3('0x43')]=_0x239238;_0x1f9de9[_0x81f3('0x23')]=_0x25f4b2[_0x81f3('0x23')];_0x43e8c2[_0x81f3('0x44')][_0x1f1282]['on'](_0x81f3('0x45'),function(){logger[_0x81f3('0x2b')](_0x81f3('0x46'),_0x1f1282);stopRouting(_0x1f1282,_0x16fd08,_0x25f4b2,_0x43e8c2);clearTimeout(_0x4cefcb);_0x4cefcb=undefined;_0x1f9de9[_0x81f3('0x47')](!![]);if(_0x43e8c2[_0x81f3('0x44')][_0x1f1282]){delete _0x43e8c2[_0x81f3('0x44')][_0x1f1282];}_0x25d24f[_0x81f3('0x3e')]();});_0x43e8c2[_0x81f3('0x44')][_0x1f1282]['on'](_0x81f3('0x48'),function(){if(_0x43e8c2[_0x81f3('0x44')][_0x1f1282]){delete _0x43e8c2[_0x81f3('0x44')][_0x1f1282];}});_0x4cefcb=setTimeout(function(){logger['info'](_0x81f3('0x49'),_0x1f1282);endRouting(_0x1f1282,_0x16fd08,_0x25f4b2,_0x43e8c2);clearTimeout(_0x4cefcb);_0x1f9de9[_0x81f3('0x47')](!![]);_0x25d24f[_0x81f3('0x4a')]();},_0x239238);switch(_0x16fd08[_0x81f3('0x4b')]){case _0x81f3('0x4c'):strategy[_0x81f3('0x4c')](_0x1f9de9,_0x16fd08,_0x43e8c2,_0x25f4b2);break;default:strategy['beepall'](_0x1f9de9,_0x16fd08,_0x43e8c2,_0x25f4b2);}}else{logger[_0x81f3('0x31')]('[%s][QUEUE]\x20queue\x20not\x20found\x20%s',_0x1f1282,_0x4f903a[_0x81f3('0x2d')]);_0x25d24f[_0x81f3('0x3e')]();}}}catch(_0x416997){console[_0x81f3('0x4d')](_0x416997);logger[_0x81f3('0x31')](_0x81f3('0x3c'),_0x1f1282,_0x416997[_0x81f3('0x4e')]);_0x25d24f[_0x81f3('0x3e')]();}};};
\ No newline at end of file