mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
test: Import folder test (#4321)
* fix: import old version appflowy data * chore: add 037 test * chore: add default appflowy cloud url * chore: bump collab
This commit is contained in:
@ -8,7 +8,6 @@ use collab_entity::{CollabObject, CollabType};
|
||||
use collab_plugins::connect_state::{CollabConnectReachability, CollabConnectState};
|
||||
use collab_plugins::local_storage::kv::snapshot::SnapshotPersistence;
|
||||
use collab_plugins::local_storage::rocksdb::rocksdb_plugin::{RocksdbBackup, RocksdbDiskPlugin};
|
||||
use collab_plugins::local_storage::rocksdb::snapshot_plugin::CollabSnapshotPlugin;
|
||||
use collab_plugins::local_storage::CollabPersistenceConfig;
|
||||
use parking_lot::{Mutex, RwLock};
|
||||
use tracing::trace;
|
||||
@ -230,8 +229,11 @@ impl AppFlowyCollabBuilder {
|
||||
.with_doc_state(collab_doc_state)
|
||||
.with_plugin(RocksdbDiskPlugin::new_with_config(
|
||||
uid,
|
||||
object_id.to_string(),
|
||||
object_type.clone(),
|
||||
collab_db.clone(),
|
||||
persistence_config.clone(),
|
||||
self.snapshot_persistence.lock().as_ref().map(Arc::clone),
|
||||
))
|
||||
.with_device_id(self.device_id.clone())
|
||||
.build()?,
|
||||
@ -252,7 +254,7 @@ impl AppFlowyCollabBuilder {
|
||||
.await
|
||||
.get_plugins(CollabPluginProviderContext::AppFlowyCloud {
|
||||
uid,
|
||||
collab_object: collab_object.clone(),
|
||||
collab_object,
|
||||
local_collab,
|
||||
})
|
||||
.await;
|
||||
@ -272,7 +274,7 @@ impl AppFlowyCollabBuilder {
|
||||
.await
|
||||
.get_plugins(CollabPluginProviderContext::Supabase {
|
||||
uid,
|
||||
collab_object: collab_object.clone(),
|
||||
collab_object,
|
||||
local_collab,
|
||||
local_collab_db,
|
||||
})
|
||||
@ -284,20 +286,6 @@ impl AppFlowyCollabBuilder {
|
||||
CollabPluginProviderType::Local => {},
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(snapshot_persistence) = self.snapshot_persistence.lock().as_ref() {
|
||||
if persistence_config.enable_snapshot {
|
||||
let snapshot_plugin = CollabSnapshotPlugin::new(
|
||||
uid,
|
||||
collab_object,
|
||||
snapshot_persistence.clone(),
|
||||
collab_db,
|
||||
persistence_config.snapshot_per_update,
|
||||
);
|
||||
// tracing::trace!("add snapshot plugin: {}", object_id);
|
||||
collab.lock().add_plugin(Arc::new(snapshot_plugin));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
collab.lock().initialize();
|
||||
|
Reference in New Issue
Block a user