Skip to content

Commit

Permalink
Do not fail when no instances
Browse files Browse the repository at this point in the history
  • Loading branch information
cschleiden committed Nov 21, 2023
1 parent 936c3b2 commit 280def5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions backend/redis/diagnostics.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ func (rb *redisBackend) GetWorkflowInstances(ctx context.Context, afterInstanceI
instanceKeys = append(instanceKeys, instanceKeyFromSegment(instanceSegment))
}

if len(instanceKeys) == 0 {
return nil, nil
}

instances, err := rb.rdb.MGet(ctx, instanceKeys...).Result()
if err != nil {
return nil, fmt.Errorf("getting instances: %w", err)
Expand Down

0 comments on commit 280def5

Please sign in to comment.