UPDATE: Fix bug
All checks were successful
Build and Release / release (push) Successful in 1m5s

This commit is contained in:
2026-04-23 16:16:59 +07:00
parent 98bf745f1b
commit 44a63f29c6
6 changed files with 12 additions and 11 deletions

View File

@@ -73,9 +73,16 @@ func runSingleWorker(ctx context.Context, rdb *redis.Client, consumerID int, sc
log.Error().Err(err).Msg("Failed to unmarshal payload")
continue
}
storageKeys := make([]string, len(data))
for i, item := range data {
storageKeys[i] = item.StorageKey
storageKeys := make([]string, 0, len(data))
for _, item := range data {
if item != nil && item.StorageKey != "" {
storageKeys = append(storageKeys, item.StorageKey)
}
}
if len(storageKeys) == 0 {
log.Info().Str("worker", consumerName).Msg("No valid storage keys found in bulk delete payload")
rdb.XAck(ctx, constants.StreamStorageName, constants.GroupStorageName, message.ID)
continue
}
log.Info().
Str("worker", consumerName).