2
0
mirror of https://github.com/hibiken/asynq.git synced 2025-04-19 23:30:20 +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 GitHub
parent 8b422c237c
commit 13d3820703
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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))