microscopic-tiger-52909
08/30/2025, 1:27 AMadd_shutdown_callback is VERY slow and we can't rely on that to end recordings. what can i do?tall-airline-16756
08/30/2025, 1:27 AMtall-airline-16756
08/30/2025, 1:28 AMadd_shutdown_callback. It’s great for tasks that happen after everything’s wrapped up, though keep in mind there might be a slight delay because of a default 60-second timeout. If you want, you can tweak this timeout using shutdown_process_timeout in WorkerOptions.
• For a quicker, real-time response: Try the participant_disconnected event on the Room object. This lets you run code right when someone leaves. For example, you could check if the last participant has left and then kick off your cleanup logic.
• To end the whole session: Use the delete_room API to close the room and disconnect everyone.
If you’d like some detailed examples or a hand setting this up, just give me a shout—I’m here to help!
Sources: Inside a session | LiveKit Docs | Job lifecycle | LiveKit Docs | Session recording and transcripts | LiveKit Docs | livekit-plugins/livekit-plugins-aws/livekit/plugins/aws/experimental/realti...microscopic-tiger-52909
08/30/2025, 2:20 AMtall-airline-16756
08/30/2025, 2:21 AMadd_shutdown_callback in LiveKit is set to 60 seconds. This means the shutdown process will wait up to 60 seconds for the callback to finish before it forcefully stops.
If you'd like, you can change this timeout by tweaking the shutdown_process_timeout setting in WorkerOptions.
And hey, if you want a hand with setting this up, just give me a shout!