fix for auto memcached setup

This commit is contained in:
yashsinghcodes
2025-03-17 17:42:20 +05:30
parent f0c2dfa3d2
commit 7710deabd3
+3 -1
View File
@@ -456,6 +456,8 @@ func deployServiceWorkers(image string) {
} }
} }
// Only do this if no memcached is set manually
if os.Getenv("SHUFFLE_MEMCACHED") == "" {
isMemcachedRunning, err := checkMemcached(ctx, dockercli) isMemcachedRunning, err := checkMemcached(ctx, dockercli)
if err != nil { if err != nil {
log.Printf("[ERROR] Failed checking memcached: %s", err) log.Printf("[ERROR] Failed checking memcached: %s", err)
@@ -466,8 +468,8 @@ func deployServiceWorkers(image string) {
} }
ip := "shuffle-cache" ip := "shuffle-cache"
os.Setenv("SHUFFLE_MEMCACHED", fmt.Sprintf("%s:11211", ip)) os.Setenv("SHUFFLE_MEMCACHED", fmt.Sprintf("%s:11211", ip))
}
defaultNetworkAttach := false defaultNetworkAttach := false
if containerId != "" { if containerId != "" {