24 lines
473 B
Python
24 lines
473 B
Python
from __future__ import annotations
|
|
|
|
import logging
|
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
|
|
class ProviderSyncError(Exception):
|
|
pass
|
|
|
|
|
|
class ProviderSyncService:
|
|
def sync(self, subscription):
|
|
raise NotImplementedError
|
|
|
|
|
|
class ButtondownSyncService(ProviderSyncService):
|
|
def sync(self, subscription):
|
|
logger.info("Synced subscription %s", subscription.email)
|
|
|
|
|
|
def get_provider_service() -> ProviderSyncService:
|
|
return ButtondownSyncService()
|