feat(config): make ArcGIS data source URLs configurable

- Add ARCGIS_CABLE_URL, ARCGIS_LANDING_POINT_URL, ARCGIS_CABLE_LANDING_RELATION_URL to config
- Use @property to read URL from settings in collectors
- URLs can now be configured via environment variables
This commit is contained in:
rayd1o
2026-03-12 17:08:18 +08:00
parent 14d11cd99d
commit 99771a88c5
4 changed files with 19 additions and 16 deletions

View File

@@ -27,6 +27,10 @@ class Settings(BaseSettings):
CORS_ORIGINS: List[str] = ["http://localhost:3000", "http://localhost:8000"]
ARCGIS_CABLE_URL: str = "https://services.arcgis.com/6DIQcwlPy8knb6sg/ArcGIS/rest/services/SubmarineCables/FeatureServer/2/query"
ARCGIS_LANDING_POINT_URL: str = "https://services.arcgis.com/6DIQcwlPy8knb6sg/ArcGIS/rest/services/SubmarineCables/FeatureServer/1/query"
ARCGIS_CABLE_LANDING_RELATION_URL: str = "https://services.arcgis.com/6DIQcwlPy8knb6sg/ArcGIS/rest/services/SubmarineCables/FeatureServer/3/query"
@property
def REDIS_URL(self) -> str:
return os.getenv(