Sfoglia il codice sorgente

Disable homestay service until service::disabled is uniformly enforced

ZiB 4 mesi fa
parent
commit
c3393e373f
1 ha cambiato i file con 4 aggiunte e 2 eliminazioni
  1. 4 2
      room_cal/service_api/client.py

+ 4 - 2
room_cal/service_api/client.py

@@ -4,7 +4,7 @@ from datetime import date
 
 from ._airbnb import _AirbnbClient
 from ._booking import _BookingClient
-from ._homestay import _HomestayClient
+# from ._homestay import _HomestayClient  # disabled until service::disabled is applied uniformly
 from ._protocols import ChatClient, ServiceClient
 from .types import DayInfo, ServiceAuthError
 
@@ -28,10 +28,12 @@ class ServiceAPI:
     self._clients = {}
     self._disabled: dict[str, str] = {}
     svc_cfg = get_config().services
+    # TODO: service::disabled is not applied uniformly across all codepaths;
+    # audit and fix before re-enabling homestay via config rather than here.
     for key, factory in {
       'airbnb': _AirbnbClient.from_env,
       'booking': _BookingClient.from_env,
-      'homestay': _HomestayClient.from_env,
+      # 'homestay': _HomestayClient.from_env,
     }.items():
       if (cfg := svc_cfg.get(key)) and cfg.disabled:
         _log.info('service %s disabled by config', key)