Skip to content

Commit 7207add

Browse files
committed
run worker in dev mode
1 parent 3f6ba52 commit 7207add

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

software/main.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ def run_command(command):
192192
try:
193193
response = requests.get(url)
194194
if response.status_code == 200:
195-
print("livekit server is running")
195+
continue
196196
else:
197197
print("request failed: ", response.status_code)
198198
break
@@ -205,7 +205,6 @@ def run_command(command):
205205
os.killpg(os.getpgid(process.pid), signal.SIGTERM)
206206
except ProcessLookupError:
207207
pass # Process group already terminated
208-
209208

210209
# Start the livekit server
211210
if debug:
@@ -302,8 +301,8 @@ def signal_handler(sig, frame):
302301
.with_name("You") \
303302
.with_grants(api.VideoGrants(
304303
room_join=True,
305-
room=ROOM_NAME,
306-
)).to_jwt())
304+
room=ROOM_NAME,))
305+
.to_jwt())
307306

308307
### DISPLAY QR CODE
309308
if qr:
@@ -360,8 +359,7 @@ def run_next_server():
360359
spinner.stop()
361360
print(f"\nOpening meet interface at: {meet_url}")
362361
webbrowser.open(meet_url)
363-
364-
print(f"multimodal flag is: {multimodal}")
362+
365363
try:
366364
if multimodal:
367365
multimodal_main(url)

software/source/server/livekit/worker.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import numpy as np
33
import sys
44
import os
5-
import threading
65
from datetime import datetime
76
from typing import Literal, Awaitable
87

@@ -25,11 +24,6 @@
2524

2625

2726

28-
_room_lock = threading.Lock()
29-
_connected_rooms = set()
30-
31-
32-
3327
START_MESSAGE = "Hi! You can hold the white circle below to speak to me. Try asking what I can do."
3428

3529
# This function is the entrypoint for the agent.
@@ -449,14 +443,14 @@ def main(livekit_url: str):
449443

450444
# Modify sys.argv to set the path to this file as the first argument
451445
# and 'dev' as the second argument
452-
sys.argv = [str(__file__), 'start']
446+
sys.argv = [str(__file__), 'dev']
453447

454448
# Initialize the worker with the entrypoint
455449
cli.run_app(
456450
WorkerOptions(
457451
entrypoint_fnc=entrypoint,
458452
api_key="devkey",
459-
api_secret="secret",
453+
api_secret="secret",
460454
ws_url=livekit_url
461455
)
462456

0 commit comments

Comments
 (0)