use node name for state
All checks were successful
Build and Publish / BuildAndDeploy (push) Successful in 1m46s
All checks were successful
Build and Publish / BuildAndDeploy (push) Successful in 1m46s
This commit is contained in:
3
main.go
3
main.go
@@ -123,10 +123,11 @@ func (s *PoolServer) Serve() *http.ServeMux {
|
||||
}
|
||||
|
||||
var clientName = os.Getenv("POD_IP")
|
||||
var name = os.Getenv("POD_NAME")
|
||||
|
||||
func main() {
|
||||
// Create a new instance of the server
|
||||
storage, err := NewDiskStorage(fmt.Sprintf("data/%s_state.gob", clientName))
|
||||
storage, err := NewDiskStorage(fmt.Sprintf("data/%s_state.gob", name))
|
||||
if err != nil {
|
||||
log.Printf("Error loading state: %v\n", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user