(
&self,
snapshot: DriverSandbox,
sweep_started_at_ms: i64,
)
| 1415 | } |
| 1416 | |
| 1417 | async fn reconcile_snapshot_sandbox( |
| 1418 | &self, |
| 1419 | snapshot: DriverSandbox, |
| 1420 | sweep_started_at_ms: i64, |
| 1421 | ) -> Result<(), String> { |
| 1422 | let _guard = self.sync_lock.lock().await; |
| 1423 | let Some(existing) = self |
| 1424 | .store |
| 1425 | .get(Sandbox::object_type(), &snapshot.id) |
| 1426 | .await |
| 1427 | .map_err(|e| e.to_string())? |
| 1428 | else { |
| 1429 | return Ok(()); |
| 1430 | }; |
| 1431 | |
| 1432 | if existing.updated_at_ms > sweep_started_at_ms { |
| 1433 | return Ok(()); |
| 1434 | } |
| 1435 | |
| 1436 | let Some(current) = self |
| 1437 | .get_driver_sandbox(&snapshot.id, &snapshot.name) |
| 1438 | .await? |
| 1439 | else { |
| 1440 | return Ok(()); |
| 1441 | }; |
| 1442 | |
| 1443 | self.apply_sandbox_update_locked(current, Some(existing)) |
| 1444 | .await |
| 1445 | } |
| 1446 | |
| 1447 | async fn prune_missing_sandbox( |
| 1448 | &self, |
no test coverage detected