From 5ed802e37cc2ce9972237decbd985fac2f00faec Mon Sep 17 00:00:00 2001 From: defnotken Date: Thu, 20 Nov 2025 09:15:15 -0600 Subject: [PATCH 1/2] move western canadians to eastern file shard --- .../LightlessSyncAuthService/Services/GeoIPService.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/LightlessSyncServer/LightlessSyncAuthService/Services/GeoIPService.cs b/LightlessSyncServer/LightlessSyncAuthService/Services/GeoIPService.cs index a60a20f..9800862 100644 --- a/LightlessSyncServer/LightlessSyncAuthService/Services/GeoIPService.cs +++ b/LightlessSyncServer/LightlessSyncAuthService/Services/GeoIPService.cs @@ -44,12 +44,14 @@ public class GeoIPService : IHostedService if (_dbReader!.TryCity(ip, out var response)) { string? continent = response?.Continent.Code; + string? countryIso = response?.Country.IsoCode; if (!string.IsNullOrEmpty(continent) && string.Equals(continent, "NA", StringComparison.Ordinal) && response?.Location.Longitude != null) { - if (response.Location.Longitude < -102) + if (response.Location.Longitude < -102 && + !string.Equals(countryIso, "CA", StringComparison.OrdinalIgnoreCase)) { continent = "NA-W"; } @@ -57,6 +59,8 @@ public class GeoIPService : IHostedService { continent = "NA-E"; } + + _logger.LogInformation("Connecting {countryIso} to {continent}", countryIso, continent); } return continent ?? "*"; -- 2.49.1 From 86fd24f7566a22b3eafe3ffafef6f48abdd9beb7 Mon Sep 17 00:00:00 2001 From: defnotken Date: Thu, 20 Nov 2025 09:33:18 -0600 Subject: [PATCH 2/2] clean up logging --- .../LightlessSyncAuthService/Services/GeoIPService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LightlessSyncServer/LightlessSyncAuthService/Services/GeoIPService.cs b/LightlessSyncServer/LightlessSyncAuthService/Services/GeoIPService.cs index 9800862..15aa928 100644 --- a/LightlessSyncServer/LightlessSyncAuthService/Services/GeoIPService.cs +++ b/LightlessSyncServer/LightlessSyncAuthService/Services/GeoIPService.cs @@ -60,7 +60,7 @@ public class GeoIPService : IHostedService continent = "NA-E"; } - _logger.LogInformation("Connecting {countryIso} to {continent}", countryIso, continent); + _logger.LogDebug("Connecting {countryIso} to {continent}", countryIso, continent); } return continent ?? "*"; -- 2.49.1