mirror of
https://github.com/suitenumerique/meet.git
synced 2026-09-03 22:25:27 +00:00
wip create timestamp on utc timezone
This commit is contained in:
@@ -6,7 +6,7 @@ import logging
|
|||||||
import os
|
import os
|
||||||
import uuid
|
import uuid
|
||||||
from dataclasses import asdict, dataclass
|
from dataclasses import asdict, dataclass
|
||||||
from datetime import datetime
|
from datetime import datetime, timezone
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
from typing import List, Optional
|
from typing import List, Optional
|
||||||
|
|
||||||
@@ -67,7 +67,7 @@ class VADAgent(Agent):
|
|||||||
"""Initialize VAD monitoring for this participant."""
|
"""Initialize VAD monitoring for this participant."""
|
||||||
@self.session.on("user_state_changed")
|
@self.session.on("user_state_changed")
|
||||||
def on_user_state(event):
|
def on_user_state(event):
|
||||||
timestamp = datetime.now()
|
timestamp = datetime.now(timezone.utc)
|
||||||
|
|
||||||
if event.new_state == "speaking":
|
if event.new_state == "speaking":
|
||||||
event = MetadataEvent(
|
event = MetadataEvent(
|
||||||
@@ -135,7 +135,7 @@ class MetadataAgent:
|
|||||||
MetadataEvent(
|
MetadataEvent(
|
||||||
participant_id=participant_identity,
|
participant_id=participant_identity,
|
||||||
type="chat_received",
|
type="chat_received",
|
||||||
timestamp=datetime.now(),
|
timestamp=datetime.now(timezone.utc),
|
||||||
data=full_text
|
data=full_text
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@@ -210,7 +210,7 @@ class MetadataAgent:
|
|||||||
MetadataEvent(
|
MetadataEvent(
|
||||||
participant_id=participant.identity,
|
participant_id=participant.identity,
|
||||||
type="participant_connected",
|
type="participant_connected",
|
||||||
timestamp=datetime.now(),
|
timestamp=datetime.now(timezone.utc),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -236,7 +236,7 @@ class MetadataAgent:
|
|||||||
MetadataEvent(
|
MetadataEvent(
|
||||||
participant_id=participant.identity,
|
participant_id=participant.identity,
|
||||||
type="participant_disconnected",
|
type="participant_disconnected",
|
||||||
timestamp=datetime.now(),
|
timestamp=datetime.now(timezone.utc),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user