Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c24c1729ef | |||
| a3ca6f0113 | |||
| 1d9caeb17f | |||
| 5caed6222b | |||
| 46fdbc0430 | |||
| 534f3b2d47 |
@@ -131,8 +131,8 @@ class NotificationService:
|
||||
if not owner_access:
|
||||
logger.error("No owner found for recording %s", recording.id)
|
||||
return False
|
||||
|
||||
payload = {
|
||||
"owner_id": str(owner_access.user.id),
|
||||
"filename": recording.key,
|
||||
"email": owner_access.user.email,
|
||||
"sub": owner_access.user.sub,
|
||||
|
||||
@@ -25,6 +25,18 @@ export const useConnectionObserver = () => {
|
||||
posthog.capture('reconnect-event')
|
||||
}
|
||||
|
||||
const handleReconnected = () => {
|
||||
posthog.capture('reconnected-event')
|
||||
}
|
||||
|
||||
const handleSignalingConnect = () => {
|
||||
posthog.capture('signaling-connect-event')
|
||||
}
|
||||
|
||||
const handleSignalingReconnect = () => {
|
||||
posthog.capture('signaling-reconnect-event')
|
||||
}
|
||||
|
||||
const handleDisconnect = (
|
||||
disconnectReason: DisconnectReason | undefined
|
||||
) => {
|
||||
@@ -43,13 +55,19 @@ export const useConnectionObserver = () => {
|
||||
}
|
||||
|
||||
room.on(RoomEvent.Connected, handleConnection)
|
||||
room.on(RoomEvent.SignalConnected, handleSignalingConnect)
|
||||
room.on(RoomEvent.Disconnected, handleDisconnect)
|
||||
room.on(RoomEvent.Reconnecting, handleReconnect)
|
||||
room.on(RoomEvent.Reconnected, handleReconnected)
|
||||
room.on(RoomEvent.SignalReconnecting, handleSignalingReconnect)
|
||||
|
||||
return () => {
|
||||
room.off(RoomEvent.Connected, handleConnection)
|
||||
room.off(RoomEvent.SignalConnected, handleSignalingConnect)
|
||||
room.off(RoomEvent.Disconnected, handleDisconnect)
|
||||
room.off(RoomEvent.Reconnecting, handleReconnect)
|
||||
room.off(RoomEvent.Reconnected, handleReconnected)
|
||||
room.off(RoomEvent.SignalReconnecting, handleSignalingReconnect)
|
||||
}
|
||||
}, [room, isAnalyticsEnabled])
|
||||
|
||||
|
||||
@@ -212,7 +212,8 @@ celeryTranscribe:
|
||||
- "worker"
|
||||
- "--pool=solo"
|
||||
- "--loglevel=info"
|
||||
- "-Q transcribe-queue"
|
||||
- "-Q"
|
||||
- "transcribe-queue"
|
||||
|
||||
celerySummarize:
|
||||
replicas: 1
|
||||
@@ -248,7 +249,8 @@ celerySummarize:
|
||||
- "worker"
|
||||
- "--pool=solo"
|
||||
- "--loglevel=info"
|
||||
- "-Q summarize-queue"
|
||||
- "-Q"
|
||||
- "summarize-queue"
|
||||
|
||||
agents:
|
||||
replicas: 1
|
||||
|
||||
@@ -82,9 +82,15 @@ spec:
|
||||
volumeMounts:
|
||||
- mountPath: /data
|
||||
name: data
|
||||
- mountPath: /etc/ssl/certs/mkcert-ca.pem
|
||||
name: mkcert
|
||||
subPath: rootCA.pem
|
||||
volumes:
|
||||
- name: data
|
||||
emptyDir:
|
||||
- name: mkcert
|
||||
secret:
|
||||
secretName: mkcert
|
||||
---
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
@@ -105,3 +111,26 @@ spec:
|
||||
exit 0
|
||||
restartPolicy: Never
|
||||
backoffLimit: 1
|
||||
---
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: minio-webhook
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: mc
|
||||
image: minio/mc
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- |
|
||||
/usr/bin/mc alias set meet http://minio:9000 meet password && \
|
||||
/usr/bin/mc admin config set meet notify_webhook:meet-webhook endpoint="https://meet.127.0.0.1.nip.io/api/v1.0/recordings/storage-hook/" auth_token="Bearer password" && \
|
||||
/usr/bin/mc admin service restart meet --wait --json && \
|
||||
sleep 15 && \
|
||||
/usr/bin/mc event add meet/meet-media-storage arn:minio:sqs::meet-webhook:webhook --event put && \
|
||||
exit 0
|
||||
restartPolicy: Never
|
||||
backoffLimit: 1
|
||||
|
||||
@@ -18,6 +18,7 @@ settings = get_settings()
|
||||
class TaskCreation(BaseModel):
|
||||
"""Task data."""
|
||||
|
||||
owner_id: str
|
||||
filename: str
|
||||
email: str
|
||||
sub: str
|
||||
@@ -35,6 +36,7 @@ async def create_task(request: TaskCreation):
|
||||
"""Create a task."""
|
||||
task = process_audio_transcribe_summarize_v2.apply_async(
|
||||
args=[
|
||||
request.owner_id,
|
||||
request.filename,
|
||||
request.email,
|
||||
request.sub,
|
||||
|
||||
@@ -200,9 +200,11 @@ def task_failure_handler(task_id, exception=None, **kwargs):
|
||||
bind=True,
|
||||
autoretry_for=[exceptions.HTTPError],
|
||||
max_retries=settings.celery_max_retries,
|
||||
queue=settings.transcribe_queue,
|
||||
)
|
||||
def process_audio_transcribe_summarize_v2(
|
||||
self,
|
||||
owner_id: str,
|
||||
filename: str,
|
||||
email: str,
|
||||
sub: str,
|
||||
@@ -319,7 +321,7 @@ def process_audio_transcribe_summarize_v2(
|
||||
metadata_manager.capture(task_id, settings.posthog_event_success)
|
||||
|
||||
if (
|
||||
analytics.is_feature_enabled("summary-enabled", distinct_id=sub)
|
||||
analytics.is_feature_enabled("summary-enabled", distinct_id=owner_id)
|
||||
and settings.is_summary_enabled
|
||||
):
|
||||
logger.info("Queuing summary generation task.")
|
||||
|
||||
Reference in New Issue
Block a user