From a8c16415e859a69ad8e0e398b8aa649ab96549ed Mon Sep 17 00:00:00 2001 From: Brandon Roberts Date: Wed, 4 Dec 2024 03:26:25 -0600 Subject: [PATCH] Update default round in docker compose files --- backend/routes/canvas.go | 15 +++++---------- docker-compose.yml | 6 +++--- main-docker-compose.yml | 6 +++--- 3 files changed, 11 insertions(+), 16 deletions(-) diff --git a/backend/routes/canvas.go b/backend/routes/canvas.go index faacf4a3..e68899e2 100644 --- a/backend/routes/canvas.go +++ b/backend/routes/canvas.go @@ -21,13 +21,8 @@ func initCanvas(w http.ResponseWriter, r *http.Request) { return } - // Get round number from query params, default to config round - roundNumber := r.URL.Query().Get("round") - if roundNumber == "" { - roundNumber = strconv.FormatUint(uint64(core.ArtPeaceBackend.CanvasConfig.Round), 10) - } - - canvasKey := fmt.Sprintf("canvas-%s", roundNumber) + roundNumber := core.ArtPeaceBackend.CanvasConfig.Round + canvasKey := fmt.Sprintf("canvas-%d", roundNumber) if core.ArtPeaceBackend.Databases.Redis.Exists(context.Background(), canvasKey).Val() == 0 { totalBitSize := core.ArtPeaceBackend.CanvasConfig.Canvas.Width * core.ArtPeaceBackend.CanvasConfig.Canvas.Height * core.ArtPeaceBackend.CanvasConfig.ColorsBitWidth @@ -46,9 +41,9 @@ func initCanvas(w http.ResponseWriter, r *http.Request) { return } - routeutils.WriteResultJson(w, fmt.Sprintf("Canvas for round %s initialized", roundNumber)) + routeutils.WriteResultJson(w, fmt.Sprintf("Canvas for round %d initialized", roundNumber)) } else { - routeutils.WriteErrorJson(w, http.StatusConflict, fmt.Sprintf("Canvas for round %s already initialized", roundNumber)) + routeutils.WriteErrorJson(w, http.StatusConflict, fmt.Sprintf("Canvas for round %d already initialized", roundNumber)) } } @@ -58,7 +53,7 @@ func getCanvas(w http.ResponseWriter, r *http.Request) { // Get round number from query params, default to config round roundNumber := r.URL.Query().Get("round") if roundNumber == "" { - roundNumber = strconv.FormatUint(uint64(core.ArtPeaceBackend.CanvasConfig.Round), 10) + roundNumber = strconv.Itoa(int(core.ArtPeaceBackend.CanvasConfig.Round)) } canvasKey := fmt.Sprintf("canvas-%s", roundNumber) diff --git a/docker-compose.yml b/docker-compose.yml index b42dbe57..68a4309e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -35,7 +35,7 @@ services: - POSTGRES_PASSWORD=password - ART_PEACE_END_TIME=3000000000 - ART_PEACE_HOST=0328ced46664355fc4b885ae7011af202313056a7e3d44827fb24c9d3206aaa0 - - ROUND_NUMBER=1 + - ROUND_NUMBER=2 volumes: - nfts:/app/nfts consumer: @@ -50,7 +50,7 @@ services: restart: always environment: - POSTGRES_PASSWORD=password - - ROUND_NUMBER=1 + - ROUND_NUMBER=2 volumes: - nfts:/app/nfts - worlds:/app/worlds @@ -143,7 +143,7 @@ services: - devnet environment: - REACT_APP_BASE_PIXEL_TIMER=30000 - - REACT_APP_ROUND_NUMBER=1 + - REACT_APP_ROUND_NUMBER=2 volumes: - ./frontend/package.json:/app/package.json - ./frontend/package-lock.json:/app/package-lock.json diff --git a/main-docker-compose.yml b/main-docker-compose.yml index 55e12a46..c107881e 100644 --- a/main-docker-compose.yml +++ b/main-docker-compose.yml @@ -35,7 +35,7 @@ services: - POSTGRES_PASSWORD=password - ART_PEACE_END_TIME=3000000000 - ART_PEACE_HOST=0328ced46664355fc4b885ae7011af202313056a7e3d44827fb24c9d3206aaa0 - - ROUND_NUMBER=1 + - ROUND_NUMBER=2 consumer: build: dockerfile: backend/Dockerfile.consumer @@ -48,7 +48,7 @@ services: restart: always environment: - POSTGRES_PASSWORD=password - - ROUND_NUMBER=1 + - ROUND_NUMBER=2 volumes: - nfts:/app/nfts devnet: @@ -140,7 +140,7 @@ services: - devnet environment: - REACT_APP_BASE_PIXEL_TIMER=30000 - - REACT_APP_ROUND_NUMBER=1 + - REACT_APP_ROUND_NUMBER=2 volumes: - ./frontend/package.json:/app/package.json - ./frontend/package-lock.json:/app/package-lock.json