feat(shared-sqs): Redis write-through persistence, RollingUpdate deploy (v0.1.11)

This commit is contained in:
“Naeel”
2026-04-10 07:22:41 +03:00
parent ab1e47bd35
commit c9bce7e751
13 changed files with 343 additions and 18 deletions
+4 -1
View File
@@ -1,4 +1,4 @@
// Изменено: 2026-04-09
// Изменено: 2026-04-10 — добавлена Redis persistence
// SetQueueAttributesV1 — устанавливает атрибуты очереди тенанта.
// Ловушка #9: при RedrivePolicy парсим ARN DLQ и DLQ тоже должна принадлежать тому же тенанту.
package gosqs
@@ -9,6 +9,7 @@ import (
"shared-sqs/app/interfaces"
"shared-sqs/app/models"
"shared-sqs/app/persistence"
"shared-sqs/app/utils"
log "github.com/sirupsen/logrus"
)
@@ -45,6 +46,8 @@ return utils.CreateErrorResponseV1("QueueNotFound", true)
if err := setQueueAttributesV1(queue, requestBody.Attributes); err != nil {
return utils.CreateErrorResponseV1(err.Error(), true)
}
// Сохраняем атрибуты в Redis пока держим Lock (через defer)
persistence.SaveQueue(key, queue)
respStruct := models.SetQueueAttributesResponse{
Xmlns: models.BaseXmlns,