You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
392 B
Python
13 lines
392 B
Python
# backend/app/connectors/__init__.py
|
|
from functools import lru_cache
|
|
|
|
from ..config import get_settings
|
|
from .calendar_mock import MockCalendarConnector
|
|
from .calendar_real import RealCalendarConnector
|
|
|
|
|
|
@lru_cache
|
|
def get_calendar_connector():
|
|
mode = getattr(get_settings(), "connector_calendar", "mock")
|
|
return RealCalendarConnector() if mode == "real" else MockCalendarConnector()
|