Skip to content

Commit ece4967

Browse files
committed
fix(workers): serve the post-conversation summary queue
1 parent ad96acd commit ece4967

3 files changed

Lines changed: 33 additions & 1 deletion

File tree

backends/advanced/src/advanced_omi_backend/workers/orchestrator/worker_registry.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,27 @@ def build_worker_definitions() -> List[WorkerDefinition]:
170170
)
171171
)
172172

173+
# 1x dedicated Summary Worker - serves ONLY the `summary` queue. The local
174+
# llama.cpp deployment exposes one inference slot, so allowing all six general
175+
# workers to begin summary calls merely moves waiting time inside running jobs,
176+
# where RQ correctly counts it against their 30s/60s/300s execution timeouts.
177+
# Keeping that wait in Redis means timeout clocks start only when model capacity
178+
# is actually available.
179+
workers.append(
180+
WorkerDefinition(
181+
name="rq-summary-worker",
182+
command=[
183+
"python",
184+
"-m",
185+
"advanced_omi_backend.workers.rq_worker_entry",
186+
"summary",
187+
],
188+
worker_type=WorkerType.RQ_WORKER,
189+
queues=["summary"],
190+
restart_on_failure=True,
191+
)
192+
)
193+
173194
# Audio Persistence Workers - Single-queue workers (audio queue)
174195
# Multiple workers allow concurrent audio persistence for multiple sessions
175196
for i in range(1, 4): # 3 audio workers
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from advanced_omi_backend.workers.orchestrator.worker_registry import (
2+
build_worker_definitions,
3+
)
4+
5+
6+
def test_every_post_conversation_queue_has_a_worker():
7+
served_queues = {
8+
queue for worker in build_worker_definitions() for queue in worker.queues
9+
}
10+
11+
assert {"transcription", "memory", "summary", "default"} <= served_queues

tests/endpoints/audio_upload_tests.robot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ Audio Upload Client ID Generation Test
180180
[Tags] audio-upload queue
181181
182182
# Upload first file with specific device name
183-
${device_name}= Set Variable test-upload-device
183+
${device_name}= Set Variable testupload
184184
${conversation1}= Upload Audio File ${TEST_AUDIO_FILE} device_name=${device_name}
185185
${client_id1}= Set Variable ${conversation1}[client_id]
186186
${conversation_id1}= Set Variable ${conversation1}[conversation_id]

0 commit comments

Comments
 (0)