fix: af cloud sync auth (#3873)

* feat: open workspace

* chore: update env docs

* fix: invalid user callback

* fix: token invalid

* chore: update

* chore: update

* chore: update

* chore: fix test

* chore: fix tauri build
This commit is contained in:
Nathan.fooo
2023-11-05 14:00:24 +08:00
committed by GitHub
parent b35d6131d4
commit 1025b6d553
59 changed files with 658 additions and 478 deletions

View File

@ -13,7 +13,7 @@ use collab_database::views::{CreateDatabaseParams, CreateViewParams, DatabaseLay
use collab_entity::CollabType;
use futures::executor::block_on;
use tokio::sync::RwLock;
use tracing::{instrument, trace};
use tracing::{event, instrument, trace};
use collab_integrate::collab_builder::AppFlowyCollabBuilder;
use collab_integrate::{CollabPersistenceConfig, RocksCollabDB};
@ -80,6 +80,11 @@ impl DatabaseManager {
workspace_id: String,
database_views_aggregate_id: String,
) -> FlowyResult<()> {
// Clear all existing tasks
self.task_scheduler.write().await.clear_task();
// Release all existing editors
self.editors.write().await.clear();
let collab_db = self.user.collab_db(uid)?;
let collab_builder = UserDatabaseCollabServiceImpl {
workspace_id: workspace_id.clone(),
@ -114,7 +119,11 @@ impl DatabaseManager {
}
// Construct the workspace database.
trace!("open workspace database: {}", &database_views_aggregate_id);
event!(
tracing::Level::INFO,
"open aggregate database views object: {}",
&database_views_aggregate_id
);
let collab = collab_builder.build_collab_with_config(
uid,
&database_views_aggregate_id,