Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
chore: comments on the nil check in Push
  • Loading branch information
plyr4 committed Feb 27, 2023
commit 2773d36f9db19c00054fb2ff3c8e219e7f4ca8a3
4 changes: 4 additions & 0 deletions queue/redis/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ import (
func (c *client) Push(ctx context.Context, channel string, item []byte) error {
c.Logger.Tracef("pushing item to queue %s", channel)

// ensure the item to be pushed is valid
// go-redis RPush does not support nil as of v9.0.2
//
// https://github.com/redis/go-redis/pull/1960
if item == nil {
return errors.New("item is nil")
}
Expand Down