mirror of
https://github.com/suitenumerique/meet.git
synced 2026-08-27 18:56:58 +00:00
♻️(backend) refactor analytics backend from Protocol to abstract class
Switch the analytics backend interface from a typing Protocol to an abstract base class, so the contract that backends must implement is explicit and enforced at instantiation time.
This commit is contained in:
committed by
aleb_the_flash
parent
3c0ba03976
commit
b00c4e5d6d
@@ -6,12 +6,13 @@ from typing import Any
|
||||
from posthog import Posthog
|
||||
|
||||
from ..models import User
|
||||
from . import AnalyticsBackend
|
||||
from .events import AnalyticsEvent
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class PostHogAnalytics:
|
||||
class PostHogAnalytics(AnalyticsBackend):
|
||||
"""Send events to PostHog, keyed on the user's primary key (UUID)."""
|
||||
|
||||
def __init__(
|
||||
|
||||
Reference in New Issue
Block a user