From acd73ecc24408184bad2896ad776ac2c03f492cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Lewandowski?= Date: Fri, 22 Nov 2024 15:39:26 +0100 Subject: [PATCH] fix(ARCO-283): fix PR comments --- internal/cache/redis.go | 5 +---- internal/metamorph/processor_helpers.go | 1 + 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/internal/cache/redis.go b/internal/cache/redis.go index 2e255843b..43eaa2046 100644 --- a/internal/cache/redis.go +++ b/internal/cache/redis.go @@ -85,14 +85,11 @@ func (r *RedisStore) MapSet(hashsetKey string, key string, value []byte) error { // MapDel removes a value by key in specific hashsetKey. func (r *RedisStore) MapDel(hashsetKey string, keys ...string) error { - result, err := r.client.HDel(r.ctx, hashsetKey, keys...).Result() + err := r.client.HDel(r.ctx, hashsetKey, keys...).Err() if err != nil { return errors.Join(ErrCacheFailedToDel, err) } - if result == 0 { - return ErrCacheNotFound - } return nil } diff --git a/internal/metamorph/processor_helpers.go b/internal/metamorph/processor_helpers.go index 384a58f03..9d8bc9dc7 100644 --- a/internal/metamorph/processor_helpers.go +++ b/internal/metamorph/processor_helpers.go @@ -92,6 +92,7 @@ func (p *Processor) getAndDeleteAllTransactionStatuses() (StatusUpdateMap, error err = json.Unmarshal(value, &status) if err != nil { p.logger.Error("failed to unmarshal status", slog.String("error", err.Error()), slog.String("key", key)) + continue } statuses[*hash] = status