Skip to content

Commit

Permalink
Step passed explicitly to make it thread-safe (#1715)
Browse files Browse the repository at this point in the history
step passed explicitly to make it thread-safe
  • Loading branch information
jaroslaw-pieszka authored Feb 6, 2025
1 parent e65ddb0 commit 1889f4f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/process/operation_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ type OperationManager struct {

func NewOperationManager(storage storage.Operations, step string, component kebErr.Component) *OperationManager {
op := &OperationManager{storage: storage, component: component, step: step, retryTimestamps: make(map[string]time.Time)}
go func() {
go func(step string) {
ticker := time.NewTicker(time.Hour)
defer ticker.Stop()
for {
<-ticker.C
runTimestampGC(op, step)
}
}()
}(step)
return op
}

Expand Down

0 comments on commit 1889f4f

Please sign in to comment.