mirror of
https://github.com/PostHog/posthog.git
synced 2024-12-01 12:21:02 +01:00
1696ed5950
* error if unsupported db version * upgrade mypy * fix various types for mypy * you can have it in any color you want, as long as it's black * fix mypy * Update `kafka-python` * Format with Black * Fix mypy after merge Co-authored-by: Michael Matloka <dev@twixes.com>
16 lines
498 B
Python
16 lines
498 B
Python
from typing import Dict, List
|
|
from uuid import uuid4
|
|
|
|
from ee.clickhouse.models.event import create_event
|
|
from ee.clickhouse.models.session_recording_event import create_session_recording_event
|
|
|
|
|
|
def bulk_create_events(events: List[Dict], **kw):
|
|
for event_data in events:
|
|
create_event(**event_data, **kw, event_uuid=uuid4())
|
|
|
|
|
|
def bulk_create_session_recording_events(events: List[Dict], **kw):
|
|
for data in events:
|
|
create_session_recording_event(**data, **kw, uuid=uuid4())
|