MCPcopy Create free account
hub / github.com/AI45Lab/Code / mark_failed

Method mark_failed

core/src/run.rs:182–192  ·  view source on GitHub ↗
(&self, run_id: &str, error: impl Into<String>)

Source from the content-addressed store, hash-verified

180 }
181
182 pub async fn mark_failed(&self, run_id: &str, error: impl Into<String>) -> Option<RunSnapshot> {
183 let mut runs = self.runs.write().await;
184 let run = runs.get_mut(run_id)?;
185 if run.status == RunStatus::Cancelled {
186 return Some(run.clone());
187 }
188 run.status = RunStatus::Failed;
189 run.error = Some(error.into());
190 run.updated_at_ms = now_ms();
191 Some(run.clone())
192 }
193
194 pub async fn mark_cancelled(&self, run_id: &str) -> Option<RunSnapshot> {
195 let mut runs = self.runs.write().await;

Callers 1

completeMethod · 0.80

Calls 3

writeMethod · 0.80
now_msFunction · 0.70
cloneMethod · 0.45

Tested by

no test coverage detected