Built motion from commit 82a371561bcdbc7605c801e5e414f4032ba9e7ad. Version 3.0.0...
[motion-next.git] / server / services / routing / server / applications / strategy / agent.js
index 6683f87..eb8b0ec 100644 (file)
@@ -1 +1 @@
-const a1209_0x4263=['handleTimeout','[%s][AGENT]\x20agent\x20%s\x20is\x20not\x20available',':FORCED','handleRun','routing','agents','lodash','[%s][AGENT]\x20agent\x20skipped,\x20unknown\x20id\x20%s','prototype','squeue','channel','busyQueue','realtime','busy','info','[%s][AGENT]\x20try\x20with\x20%s','push','../../../../../config/logger','notificationId','bind','uuid','handleDrained','[%s][AGENT]\x20timeout\x20with\x20%s','./util','isNil','writeLog','forcedOwnership','STOP','TIMEOUT','agent','drained'];(function(_0x5849f1,_0x426320){const _0x410957=function(_0x1a2ee2){while(--_0x1a2ee2){_0x5849f1['push'](_0x5849f1['shift']());}};_0x410957(++_0x426320);}(a1209_0x4263,0x16b));const a1209_0x4109=function(_0x5849f1,_0x426320){_0x5849f1=_0x5849f1-0x0;let _0x410957=a1209_0x4263[_0x5849f1];return _0x410957;};const _0x370461=a1209_0x4109;'use strict';const _=require(_0x370461('0xf')),uuid=require(_0x370461('0x1d')),util=require(_0x370461('0x1')),logger=require(_0x370461('0x1a'))(_0x370461('0xd')),Agent=function(_0x1a2ee2,_0x2c1073,_0x2abb37,_0x45ab95){const _0x27199e=_0x370461;this['notificationId']=uuid['v4'](),this[_0x27199e('0x12')]=_0x1a2ee2,this[_0x27199e('0x7')]=_0x2c1073,this[_0x27199e('0x15')]=_0x2abb37,this[_0x27199e('0xd')]=_0x45ab95,this['squeue'][_0x27199e('0x19')](this[_0x27199e('0xc')]['bind'](this),this['handleTimeout'][_0x27199e('0x1c')](this)),this['squeue']['on']('timeout',this[_0x27199e('0x9')]['bind'](this)),this[_0x27199e('0x12')]['on'](_0x27199e('0x8'),this[_0x27199e('0x1e')][_0x27199e('0x1c')](this));};Agent[_0x370461('0x11')][_0x370461('0x19')]=function(){const _0x3d2f01=_0x370461;this['squeue'][_0x3d2f01('0x19')](this[_0x3d2f01('0xc')]['bind'](this),this[_0x3d2f01('0x9')][_0x3d2f01('0x1c')](this));},Agent[_0x370461('0x11')][_0x370461('0x1e')]=function(){const _0x4b0bb3=_0x370461;this[_0x4b0bb3('0x9')](!![]);},Agent[_0x370461('0x11')][_0x370461('0xc')]=function(){const _0x400aee=_0x370461;logger[_0x400aee('0x17')](_0x400aee('0x18'),this['squeue']['id'],this[_0x400aee('0x7')]['id']),_[_0x400aee('0x2')](this[_0x400aee('0x15')]['agents'][this[_0x400aee('0x7')]['id']])?(logger[_0x400aee('0x17')](_0x400aee('0x10'),this[_0x400aee('0x12')]['id'],this[_0x400aee('0x7')]['id']),setTimeout(this[_0x400aee('0x19')][_0x400aee('0x1c')](this),0x3e8)):this[_0x400aee('0xd')][_0x400aee('0x4')]||util['isAgentAvailable'](this['squeue']['id'],this['realtime'][_0x400aee('0xe')][this[_0x400aee('0x7')]['id']],this[_0x400aee('0x12')][_0x400aee('0x13')],![])?(this[_0x400aee('0x15')]['agents'][this[_0x400aee('0x7')]['id']]['busy']=!![],this[_0x400aee('0x15')][_0x400aee('0xe')][this[_0x400aee('0x7')]['id']][_0x400aee('0x14')]=undefined,util['showNotification'](this[_0x400aee('0x1b')],this[_0x400aee('0x12')]['id'],this[_0x400aee('0x15')]['agents'][this[_0x400aee('0x7')]['id']],null,this[_0x400aee('0xd')]),util[_0x400aee('0x3')](this[_0x400aee('0x12')]['id'],this[_0x400aee('0x15')][_0x400aee('0xe')][this[_0x400aee('0x7')]['id']],'RINGING'+(this[_0x400aee('0xd')][_0x400aee('0x4')]?_0x400aee('0xb'):''))):(logger[_0x400aee('0x17')](_0x400aee('0xa'),this[_0x400aee('0x12')]['id'],this['agent']['id']),setTimeout(this[_0x400aee('0x19')][_0x400aee('0x1c')](this),0x3e8));},Agent[_0x370461('0x11')][_0x370461('0x9')]=function(_0xfed0bc){const _0x12fbfb=_0x370461;if(_[_0x12fbfb('0x2')](this[_0x12fbfb('0x15')][_0x12fbfb('0xe')][this['agent']['id']]))return logger[_0x12fbfb('0x17')]('[%s][AGENT]\x20agent\x20skipped,\x20unknown\x20id\x20%s',this[_0x12fbfb('0x12')]['id'],this[_0x12fbfb('0x7')]['id']);else logger[_0x12fbfb('0x17')](_0x12fbfb('0x0'),this['squeue']['id'],this[_0x12fbfb('0x7')]['id']),util['hideNotification'](this['notificationId'],this['squeue']['id'],this[_0x12fbfb('0x15')][_0x12fbfb('0xe')][this['agent']['id']],null,this[_0x12fbfb('0xd')]),this['realtime'][_0x12fbfb('0xe')][this[_0x12fbfb('0x7')]['id']][_0x12fbfb('0x16')]=![],this[_0x12fbfb('0x15')][_0x12fbfb('0xe')][this[_0x12fbfb('0x7')]['id']][_0x12fbfb('0x14')]=undefined,util[_0x12fbfb('0x3')](this[_0x12fbfb('0x12')]['id'],this['realtime'][_0x12fbfb('0xe')][this['agent']['id']],_0xfed0bc?_0x12fbfb('0x5'):_0x12fbfb('0x6'));!_0xfed0bc&&setTimeout(this[_0x12fbfb('0x19')][_0x12fbfb('0x1c')](this),0x3e8);};function agent(_0x21df75,_0x74307b,_0xde29d1,_0x126b9a){return new Agent(_0x21df75,_0x74307b,_0xde29d1,_0x126b9a);}module['exports']=agent;
\ No newline at end of file
+const a1209_0x1b20=['agent','showNotification','isNil','busy','STOP','handleTimeout','[%s][AGENT]\x20agent\x20skipped,\x20unknown\x20id\x20%s','routing','busyQueue',':FORCED','[%s][AGENT]\x20agent\x20%s\x20is\x20not\x20available','isAgentAvailable','notificationId','timeout','[%s][AGENT]\x20timeout\x20with\x20%s','realtime','uuid','RINGING','exports','agents','squeue','handleDrained','push','prototype','[%s][AGENT]\x20try\x20with\x20%s','bind','writeLog','hideNotification','info','handleRun','../../../../../config/logger','forcedOwnership'];(function(_0x588ade,_0x1b202e){const _0x11065f=function(_0xe91fbe){while(--_0xe91fbe){_0x588ade['push'](_0x588ade['shift']());}};_0x11065f(++_0x1b202e);}(a1209_0x1b20,0x164));const a1209_0x1106=function(_0x588ade,_0x1b202e){_0x588ade=_0x588ade-0x0;let _0x11065f=a1209_0x1b20[_0x588ade];return _0x11065f;};const _0x56a94e=a1209_0x1106;'use strict';const _=require('lodash'),uuid=require(_0x56a94e('0xc')),util=require('./util'),logger=require(_0x56a94e('0x1a'))(_0x56a94e('0x3')),Agent=function(_0xe91fbe,_0x3d2c9e,_0x13b43d,_0x109be6){const _0x34abe0=_0x56a94e;this[_0x34abe0('0x8')]=uuid['v4'](),this[_0x34abe0('0x10')]=_0xe91fbe,this[_0x34abe0('0x1c')]=_0x3d2c9e,this[_0x34abe0('0xb')]=_0x13b43d,this[_0x34abe0('0x3')]=_0x109be6,this['squeue'][_0x34abe0('0x12')](this[_0x34abe0('0x19')][_0x34abe0('0x15')](this),this[_0x34abe0('0x1')]['bind'](this)),this[_0x34abe0('0x10')]['on'](_0x34abe0('0x9'),this[_0x34abe0('0x1')][_0x34abe0('0x15')](this)),this[_0x34abe0('0x10')]['on']('drained',this[_0x34abe0('0x11')][_0x34abe0('0x15')](this));};Agent[_0x56a94e('0x13')]['push']=function(){const _0x33d4f5=_0x56a94e;this[_0x33d4f5('0x10')][_0x33d4f5('0x12')](this[_0x33d4f5('0x19')][_0x33d4f5('0x15')](this),this['handleTimeout'][_0x33d4f5('0x15')](this));},Agent[_0x56a94e('0x13')][_0x56a94e('0x11')]=function(){const _0x595cf3=_0x56a94e;this[_0x595cf3('0x1')](!![]);},Agent[_0x56a94e('0x13')]['handleRun']=function(){const _0x8f5958=_0x56a94e;logger[_0x8f5958('0x18')](_0x8f5958('0x14'),this['squeue']['id'],this['agent']['id']),_[_0x8f5958('0x1e')](this[_0x8f5958('0xb')][_0x8f5958('0xf')][this['agent']['id']])?(logger[_0x8f5958('0x18')](_0x8f5958('0x2'),this['squeue']['id'],this[_0x8f5958('0x1c')]['id']),setTimeout(this[_0x8f5958('0x12')][_0x8f5958('0x15')](this),0x3e8)):this[_0x8f5958('0x3')][_0x8f5958('0x1b')]||util[_0x8f5958('0x7')](this[_0x8f5958('0x10')]['id'],this[_0x8f5958('0xb')]['agents'][this[_0x8f5958('0x1c')]['id']],this[_0x8f5958('0x10')]['channel'],![])?(this['realtime']['agents'][this[_0x8f5958('0x1c')]['id']]['busy']=!![],this[_0x8f5958('0xb')]['agents'][this['agent']['id']]['busyQueue']=undefined,util[_0x8f5958('0x1d')](this[_0x8f5958('0x8')],this[_0x8f5958('0x10')]['id'],this[_0x8f5958('0xb')][_0x8f5958('0xf')][this[_0x8f5958('0x1c')]['id']],null,this['routing']),util['writeLog'](this[_0x8f5958('0x10')]['id'],this[_0x8f5958('0xb')]['agents'][this[_0x8f5958('0x1c')]['id']],_0x8f5958('0xd')+(this['routing'][_0x8f5958('0x1b')]?_0x8f5958('0x5'):''))):(logger[_0x8f5958('0x18')](_0x8f5958('0x6'),this[_0x8f5958('0x10')]['id'],this[_0x8f5958('0x1c')]['id']),setTimeout(this['push']['bind'](this),0x3e8));},Agent[_0x56a94e('0x13')][_0x56a94e('0x1')]=function(_0x3bddc4){const _0x4c369a=_0x56a94e;if(_[_0x4c369a('0x1e')](this['realtime'][_0x4c369a('0xf')][this[_0x4c369a('0x1c')]['id']]))return logger[_0x4c369a('0x18')](_0x4c369a('0x2'),this[_0x4c369a('0x10')]['id'],this['agent']['id']);else logger[_0x4c369a('0x18')](_0x4c369a('0xa'),this[_0x4c369a('0x10')]['id'],this[_0x4c369a('0x1c')]['id']),util[_0x4c369a('0x17')](this[_0x4c369a('0x8')],this[_0x4c369a('0x10')]['id'],this['realtime'][_0x4c369a('0xf')][this[_0x4c369a('0x1c')]['id']],null,this['routing']),this[_0x4c369a('0xb')]['agents'][this[_0x4c369a('0x1c')]['id']][_0x4c369a('0x1f')]=![],this[_0x4c369a('0xb')][_0x4c369a('0xf')][this[_0x4c369a('0x1c')]['id']][_0x4c369a('0x4')]=undefined,util[_0x4c369a('0x16')](this['squeue']['id'],this[_0x4c369a('0xb')]['agents'][this[_0x4c369a('0x1c')]['id']],_0x3bddc4?_0x4c369a('0x0'):'TIMEOUT');!_0x3bddc4&&setTimeout(this['push']['bind'](this),0x3e8);};function agent(_0x2bcdb7,_0x3f7bd7,_0x758e03,_0x4ba868){return new Agent(_0x2bcdb7,_0x3f7bd7,_0x758e03,_0x4ba868);}module[_0x56a94e('0xe')]=agent;
\ No newline at end of file