From dfa3ba700a1e15435e1131b7877ced5ccd596126 Mon Sep 17 00:00:00 2001 From: "i.navrotskyj" Date: Tue, 20 Aug 2024 17:39:22 +0300 Subject: [PATCH] DEV-4420 --- queue/schema.go | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/queue/schema.go b/queue/schema.go index bbeb0346..91dc7969 100644 --- a/queue/schema.go +++ b/queue/schema.go @@ -40,10 +40,18 @@ func (qm *QueueManager) StartProcessingForm(schemaId int, att *Attempt) { return } att.processingForm = pf - e := NewNextFormEvent(att, att.agent.UserId()) - appErr := qm.mq.AgentChannelEvent(att.channel, att.domainId, att.QueueId(), att.agent.UserId(), e) + + // TODO DEV-4420, implement mx + agent := att.Agent() + if agent == nil { + att.Log("set form error: not found agent") + return + } + + e := NewNextFormEvent(att, agent.UserId()) + appErr := qm.mq.AgentChannelEvent(att.channel, att.domainId, att.QueueId(), agent.UserId(), e) if appErr != nil { - wlog.Error(err.Error()) + wlog.Error(appErr.Error()) } }