Skip to content

Commit 2cebf16

Browse files
committed
Remove unused code
1 parent ac207ce commit 2cebf16

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

backend/redis/instance.go

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -175,25 +175,6 @@ func createInstanceP(ctx context.Context, p redis.Pipeliner, instance *core.Work
175175
return nil
176176
}
177177

178-
func updateInstanceP(ctx context.Context, p redis.Pipeliner, instance *core.WorkflowInstance, state *instanceState) error {
179-
key := instanceKey(instance)
180-
181-
b, err := json.Marshal(state)
182-
if err != nil {
183-
return fmt.Errorf("marshaling instance state: %w", err)
184-
}
185-
186-
p.Set(ctx, key, string(b), 0)
187-
188-
if state.State != core.WorkflowInstanceStateActive {
189-
p.SRem(ctx, instancesActive(), instanceSegment(instance))
190-
}
191-
192-
// CreatedAt does not change, so skip updating the instancesByCreation() ZSET
193-
194-
return nil
195-
}
196-
197178
func readInstance(ctx context.Context, rdb redis.UniversalClient, instanceKey string) (*instanceState, error) {
198179
p := rdb.Pipeline()
199180

@@ -255,9 +236,3 @@ func setActiveInstanceExecutionP(ctx context.Context, p redis.Pipeliner, instanc
255236

256237
return p.Set(ctx, key, string(b), 0).Err()
257238
}
258-
259-
func removeActiveInstanceExecutionP(ctx context.Context, p redis.Pipeliner, instance *core.WorkflowInstance) error {
260-
key := activeInstanceExecutionKey(instance.InstanceID)
261-
262-
return p.Del(ctx, key).Err()
263-
}

0 commit comments

Comments
 (0)