From 5f2d86e23405c99a72ee1b52d2005a8b6818d63d Mon Sep 17 00:00:00 2001 From: Johan de Klerk <johan@shiplogic.com> Date: Thu, 6 Apr 2023 15:10:25 +0200 Subject: [PATCH] Dont wait for SQS response --- sqs/sqs.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sqs/sqs.go b/sqs/sqs.go index 450e210..369c220 100644 --- a/sqs/sqs.go +++ b/sqs/sqs.go @@ -106,9 +106,12 @@ func (m *Messenger) SendSQSMessage(headers map[string]string, body string, curre func SendSQSMessage(msgr Messenger, objectToSend interface{}, currentRequestID *string, sqsType string, isDebug bool) error { if isDebug { - resty.New().R(). - SetBody(objectToSend). - Post("http://127.0.0.1:3000/sqs/" + sqsType) + go func() { + resty.New().R(). + SetBody(objectToSend). + Post("http://127.0.0.1:3000/sqs/" + sqsType) + }() + time.Sleep(time.Second*1) return nil } -- GitLab