Skip to content

Commit 411bac6

Browse files
committed
Remove unnecessary lock in operator init
1 parent 999d848 commit 411bac6

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

pkg/operator/workloads/current_contexts.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,6 @@ func updateContextConfigMap() error {
9999
}
100100

101101
func reloadCurrentContexts() error {
102-
currentCtxs.Lock()
103-
defer currentCtxs.Unlock()
104-
105102
configMap, err := config.Kubernetes.GetConfigMap(configMapName)
106103
if err != nil {
107104
return err
@@ -113,7 +110,7 @@ func reloadCurrentContexts() error {
113110
for appName, ctxID := range configMap.Data {
114111
ctx, err := ocontext.DownloadContext(ctxID, appName)
115112
if err != nil {
116-
fmt.Printf("Deleting stale workflow: %s", appName)
113+
fmt.Printf("Deleting stale workflow: %s\n", appName)
117114
DeleteApp(appName, true)
118115
} else if ctx != nil {
119116
currentCtxs.m[appName] = ctx

0 commit comments

Comments
 (0)