2
0
mirror of https://github.com/hibiken/asynq.git synced 2025-10-11 07:43:22 +08:00

Implement RDB.ListGroups

This commit is contained in:
Ken Hibino
2022-03-10 11:06:48 -08:00
parent 7849b1114c
commit b29fe58434
3 changed files with 70 additions and 3 deletions

View File

@@ -248,7 +248,9 @@ func SeedCompletedQueue(tb testing.TB, r redis.UniversalClient, entries []base.Z
// SeedGroup initializes the group with the given entries.
func SeedGroup(tb testing.TB, r redis.UniversalClient, entries []base.Z, qname, gname string) {
tb.Helper()
r.SAdd(context.Background(), base.AllQueues, qname)
ctx := context.Background()
r.SAdd(ctx, base.AllQueues, qname)
r.SAdd(ctx, base.AllGroups(qname), gname)
seedRedisZSet(tb, r, base.GroupKey(qname, gname), entries, base.TaskStateAggregating)
}