From f3c848f25fe9a46b6eddbb93249927eb9dff5c56 Mon Sep 17 00:00:00 2001 From: Ken Hibino Date: Fri, 12 Mar 2021 16:23:08 -0800 Subject: [PATCH] Refactor redis keys and store messages in protobuf Changes: - Task messages are stored under "asynq:{}:t:" key in redis, value is a HASH type and message are stored under "msg" key in the hash. The hash also stores "deadline", "timeout". - Redis LIST and ZSET stores task message IDs - Task messages are serialized using protocol buffer --- internal/rdb/inspect.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/internal/rdb/inspect.go b/internal/rdb/inspect.go index b211858..25e8d78 100644 --- a/internal/rdb/inspect.go +++ b/internal/rdb/inspect.go @@ -765,10 +765,17 @@ func (r *RDB) DeletePendingTask(qname string, id uuid.UUID) error { n, ok := res.(int64) if !ok { return fmt.Errorf("command error: unexpected return value %v", res) +<<<<<<< HEAD } if n == 0 { return ErrTaskNotFound } +======= + } + if n == 0 { + return ErrTaskNotFound + } +>>>>>>> e0402fe... Refactor redis keys and store messages in protobuf return nil }