fix: use live worker observation snapshots

This commit is contained in:
2026-07-14 02:59:52 +09:00
parent ec951ee5c0
commit 6ca0d48327
5 changed files with 132 additions and 24 deletions
+13
View File
@@ -393,6 +393,11 @@ pub trait WorkerExecutionBackend: Send + Sync + 'static {
"execution backend does not support cancelling workers",
)
}
#[cfg(feature = "ws-server")]
fn worker_snapshot(&self, _handle: &WorkerExecutionHandle) -> Option<protocol::Event> {
None
}
}
#[derive(Clone)]
@@ -472,6 +477,14 @@ impl WorkerExecutionBackendRef {
pub(crate) fn cancel_worker(&self, handle: &WorkerExecutionHandle) -> WorkerExecutionResult {
self.backend.cancel_worker(handle)
}
#[cfg(feature = "ws-server")]
pub(crate) fn worker_snapshot(
&self,
handle: &WorkerExecutionHandle,
) -> Option<protocol::Event> {
self.backend.worker_snapshot(handle)
}
}
impl fmt::Debug for WorkerExecutionBackendRef {