2
0
mirror of https://github.com/hibiken/asynq.git synced 2024-11-10 03:21:55 +08:00

fix(274): ignore empty data to append to msgs

fix issue 274
This commit is contained in:
yeqown 2023-07-30 15:50:55 +08:00 committed by Ken Hibino
parent 7ef0511f35
commit d0041c55a3

View File

@ -1305,6 +1305,9 @@ func (r *RDB) ListLeaseExpired(cutoff time.Time, qnames ...string) ([]*base.Task
return nil, errors.E(op, errors.Internal, fmt.Sprintf("cast error: Lua script returned unexpected value: %v", res))
}
for _, s := range data {
if len(s) == 0 {
continue
}
msg, err := base.DecodeMessage([]byte(s))
if err != nil {
return nil, errors.E(op, errors.Internal, fmt.Sprintf("cannot decode message: %v", err))