From d2e78da7d2fcbd951a84ac01ea1d8e882c2eaf24 Mon Sep 17 00:00:00 2001 From: "Aaron D. Lee" Date: Tue, 27 Jan 2026 12:31:21 -0500 Subject: [PATCH] Add golf ball logo with card suits and fix server shutdown hang MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add SVG golf ball logo with dimples and card suit symbols (♣♦♠♥) - Place logo to the left of the golfer emoji in header - Fix server shutdown hanging by removing custom signal handlers that intercepted SIGINT/SIGTERM without triggering uvicorn shutdown Co-Authored-By: Claude Opus 4.5 --- client/golfball-logo.svg | 101 +++++++++++++++++++++++++++++++++++++++ client/index.html | 2 +- client/style.css | 9 ++++ server/main.py | 12 +---- 4 files changed, 112 insertions(+), 12 deletions(-) create mode 100644 client/golfball-logo.svg diff --git a/client/golfball-logo.svg b/client/golfball-logo.svg new file mode 100644 index 0000000..6b0eeb4 --- /dev/null +++ b/client/golfball-logo.svg @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/client/index.html b/client/index.html index 9b685c7..ed22839 100644 --- a/client/index.html +++ b/client/index.html @@ -16,7 +16,7 @@
-

🏌️ Golf

+

🏌️ Golf

6-Card Golf Card Game

diff --git a/client/style.css b/client/style.css index ac768ee..8ab06e6 100644 --- a/client/style.css +++ b/client/style.css @@ -77,6 +77,15 @@ body { filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.15)); } +/* Golf ball logo with card suits */ +.golfball-logo { + width: 1.1em; + height: 1.1em; + vertical-align: middle; + margin-right: 0.1em; + filter: drop-shadow(1px 2px 2px rgba(0,0,0,0.25)); +} + /* Golfer swing animation */ .golfer-swing { display: inline-block; diff --git a/server/main.py b/server/main.py index 8006b90..850dea7 100644 --- a/server/main.py +++ b/server/main.py @@ -3,7 +3,6 @@ import asyncio import logging import os -import signal import uuid from contextlib import asynccontextmanager from typing import Optional @@ -60,22 +59,13 @@ async def _periodic_leaderboard_refresh(): logger.error(f"Leaderboard refresh failed: {e}") -async def _initiate_shutdown(): - """Initiate graceful shutdown.""" - logger.info("Received shutdown signal") - _shutdown_event.set() - - @asynccontextmanager async def lifespan(app: FastAPI): """Application lifespan handler for async service initialization.""" global _user_store, _auth_service, _admin_service, _stats_service, _replay_service global _spectator_manager, _leaderboard_refresh_task, _redis_client, _rate_limiter - # Register signal handlers for graceful shutdown - loop = asyncio.get_running_loop() - for sig in (signal.SIGTERM, signal.SIGINT): - loop.add_signal_handler(sig, lambda: asyncio.create_task(_initiate_shutdown())) + # Note: Uvicorn handles SIGINT/SIGTERM and triggers lifespan cleanup automatically # Initialize Redis client (for rate limiting, health checks, etc.) if config.REDIS_URL: