Fix speaker-track readiness race: skip mixed-file wait when tracks exist
This commit is contained in:
@@ -287,7 +287,16 @@ async def process_recording(
|
||||
)
|
||||
return
|
||||
|
||||
if not await wait_for_file_ready(file_path):
|
||||
# Speaker tracks are written and finalized independently in MeetingSink
|
||||
# cleanup — they always have valid WAV headers if they exist. Check
|
||||
# them first so we can skip the mixed-file "ready" wait (which is prone
|
||||
# to timing races with the SilenceGenerator shutdown path).
|
||||
if _load_speaker_tracks(file_path):
|
||||
logger.info(
|
||||
"Speaker tracks present for guild_id=%s; skipping mixed-file readiness check",
|
||||
guild_id,
|
||||
)
|
||||
elif not await wait_for_file_ready(file_path):
|
||||
reason = "recording file was not finalized in time"
|
||||
await _save_retry_state(guild_id, file_path, fallback_channel_id, reason)
|
||||
await safe_send_chunked(
|
||||
|
||||
Reference in New Issue
Block a user