fix(replay): recover failed archives and release deleted sessions
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
import os
|
||||
import queue
|
||||
import threading
|
||||
@@ -20,6 +21,8 @@ from .recording import (
|
||||
SessionRecordingMaterializer,
|
||||
)
|
||||
|
||||
LOGGER = logging.getLogger(__name__)
|
||||
|
||||
PreparationState = Literal[
|
||||
"queued",
|
||||
"validating",
|
||||
@@ -582,6 +585,12 @@ class SessionRecordingPreparationManager:
|
||||
except Exception:
|
||||
# The public status intentionally does not expose paths,
|
||||
# broker payloads or exporter internals.
|
||||
LOGGER.exception(
|
||||
"recording preparation materialization failed: "
|
||||
"session_id=%s preparation_id=%s",
|
||||
job.command.session_id,
|
||||
job.preparation_id,
|
||||
)
|
||||
with self._guard:
|
||||
if job.cancel_event.is_set():
|
||||
self._transition_locked(job, "cancelled", job.progress)
|
||||
@@ -616,6 +625,12 @@ class SessionRecordingPreparationManager:
|
||||
recording_end_seconds=(recording.timeline_end_ns / 1_000_000_000),
|
||||
)
|
||||
except Exception:
|
||||
LOGGER.exception(
|
||||
"recording preparation finalization failed: "
|
||||
"session_id=%s preparation_id=%s",
|
||||
job.command.session_id,
|
||||
job.preparation_id,
|
||||
)
|
||||
with self._guard:
|
||||
if job.cancel_event.is_set():
|
||||
self._transition_locked(job, "cancelled", job.progress)
|
||||
|
||||
Reference in New Issue
Block a user