Skip to content

Commit 364035b

Browse files
committed
Rename key
1 parent e1a243d commit 364035b

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

backend/redis/instance.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ func createInstanceP(ctx context.Context, p redis.Pipeliner, instance *core.Work
160160
Score: float64(createdAt.UnixMilli()),
161161
})
162162

163-
p.SAdd(ctx, activeInstances(), instanceSegment(instance))
163+
p.SAdd(ctx, instancesActive(), instanceSegment(instance))
164164

165165
return nil
166166
}
@@ -176,7 +176,7 @@ func updateInstanceP(ctx context.Context, p redis.Pipeliner, instance *core.Work
176176
p.Set(ctx, key, string(b), 0)
177177

178178
if state.State != core.WorkflowInstanceStateActive {
179-
p.SRem(ctx, activeInstances(), instanceSegment(instance))
179+
p.SRem(ctx, instancesActive(), instanceSegment(instance))
180180
}
181181

182182
// CreatedAt does not change, so skip updating the instancesByCreation() ZSET

backend/redis/keys.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ func instancesByCreation() string {
2929
return "instances-by-creation"
3030
}
3131

32-
func activeInstances() string {
33-
return "active-instances"
32+
func instancesActive() string {
33+
return "instances-active"
3434
}
3535

3636
func instancesExpiring() string {

backend/redis/stats.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ func (rb *redisBackend) GetStats(ctx context.Context) (*backend.Stats, error) {
1313
s := &backend.Stats{}
1414

1515
// get workflow instances
16-
activeInstances, err := rb.rdb.SCard(ctx, activeInstances()).Result()
16+
activeInstances, err := rb.rdb.SCard(ctx, instancesActive()).Result()
1717
if err != nil {
1818
return nil, fmt.Errorf("getting active instances: %w", err)
1919
}

0 commit comments

Comments
 (0)