UPDATE: Change auth logic
All checks were successful
Build and Release / release (push) Successful in 1m27s

This commit is contained in:
2026-04-09 09:32:34 +07:00
parent a7400f832e
commit 7559667ce2
20 changed files with 448 additions and 20 deletions

View File

@@ -42,7 +42,14 @@ func runSingleWorker(ctx context.Context, rdb *redis.Client, consumerID int) {
for _, message := range stream.Messages {
taskType := message.Values["task_type"].(string)
payloadStr := message.Values["payload"].(string)
taskType, ok1 := message.Values["task_type"].(string)
payloadStr, ok2 := message.Values["payload"].(string)
if !ok1 || !ok2 {
log.Error().Msg("Invalid message format")
rdb.XAck(ctx, constants.StreamEmailName, constants.GroupEmailName, message.ID)
continue
}
if taskType == constants.TaskTypeSendEmailOTP.String() {
var data models.TokenEntity
if err := json.Unmarshal([]byte(payloadStr), &data); err != nil {