|
@@ -4,7 +4,7 @@ from datetime import date
|
|
|
|
|
|
|
|
from ._airbnb import _AirbnbClient
|
|
from ._airbnb import _AirbnbClient
|
|
|
from ._booking import _BookingClient
|
|
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 ._protocols import ChatClient, ServiceClient
|
|
|
from .types import DayInfo, ServiceAuthError
|
|
from .types import DayInfo, ServiceAuthError
|
|
|
|
|
|
|
@@ -28,10 +28,12 @@ class ServiceAPI:
|
|
|
self._clients = {}
|
|
self._clients = {}
|
|
|
self._disabled: dict[str, str] = {}
|
|
self._disabled: dict[str, str] = {}
|
|
|
svc_cfg = get_config().services
|
|
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 {
|
|
for key, factory in {
|
|
|
'airbnb': _AirbnbClient.from_env,
|
|
'airbnb': _AirbnbClient.from_env,
|
|
|
'booking': _BookingClient.from_env,
|
|
'booking': _BookingClient.from_env,
|
|
|
- 'homestay': _HomestayClient.from_env,
|
|
|
|
|
|
|
+ # 'homestay': _HomestayClient.from_env,
|
|
|
}.items():
|
|
}.items():
|
|
|
if (cfg := svc_cfg.get(key)) and cfg.disabled:
|
|
if (cfg := svc_cfg.get(key)) and cfg.disabled:
|
|
|
_log.info('service %s disabled by config', key)
|
|
_log.info('service %s disabled by config', key)
|