Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

refactor(storage): update tinystoragedrivers imports

Steven Enamakela0095372a7bf
diff --git a/crates/openhuman-core/src/storage/scope_move.rs b/crates/openhuman-core/src/storage/scope_move.rs
index 2dcd0008d4..6fbb38f837 100644
--- a/crates/openhuman-core/src/storage/scope_move.rs
+++ b/crates/openhuman-core/src/storage/scope_move.rs
@@ -18,10 +18,9 @@ use std::collections::HashSet;
use std::sync::Arc;
use sha2::Digest;
-use tinystoragedrivers::{
- DocumentStore, ErrorKind, Precondition, Scope, StorageBackend, WriteOptions,
-};
+use tinystoragedrivers_types::{CollectionSpec, ErrorKind, WriteOptions};
+use crate::storage::{DocumentStore, DocumentStoreExt, Precondition, Scope, StorageBackend};
use super::scope::{scope_for_agent, scope_for_profile, tenant_scope};
/// The `tsd.migrations` owner the move records under.
@@ -166,8 +165,7 @@ pub async fn copy_inventory(
known: &Known,
inventory: &crate::storage::import::scope_move::LegacyScopeInventory,
) -> anyhow::Result<MoveReport> {
- use anyhow::{Context, bail};
- use tinystoragedrivers::CollectionSpec;
+ use anyhow::bail;
let mut report = MoveReport::default();
let mut source_scopes: Vec<&str> = inventory.scopes.iter().map(String::as_str).collect();
@@ -305,6 +303,8 @@ pub async fn run_from_source(
source_db: &std::path::Path,
known: &Known,
) -> anyhow::Result<MoveReport> {
+ use anyhow::Context;
+
let path = source_db.to_owned();
let inventory = tokio::task::spawn_blocking(move || {
crate::storage::import::scope_move::LegacyScopeInventory::read(&path)