feat: adding suffix for user data folder when current cloud type is appflowy cloud (#3918)

* fix: load database fail caused by spawning long run task

* chore: yield long run task

* chore: fmt

* chore: update client api

* feat: copy data between server

* ci: fix af cloud test
This commit is contained in:
Nathan.fooo
2023-11-12 18:00:07 +08:00
committed by GitHub
parent 3c7e636b65
commit 7eb20b232a
51 changed files with 559 additions and 386 deletions

View File

@ -27,10 +27,11 @@ tracing = { version = "0.1", features = ["log"] }
# workspace
lib-dispatch = { workspace = true }
#flowy-core = { workspace = true, features = ["profiling"] }
flowy-core = { workspace = true }
flowy-notification = { workspace = true }
flowy-server = { workspace = true }
flowy-server-config = { workspace = true }
flowy-server-config = { workspace = true}
collab-integrate = { workspace = true }
flowy-derive = { path = "../../../shared-lib/flowy-derive" }

View File

@ -12,7 +12,7 @@ pub struct AppFlowyEnv {
impl AppFlowyEnv {
/// Parse the environment variable from the frontend application. The frontend will
/// pass the environment variable as a json string after launching.
pub fn parser(env_str: &str) {
pub fn write_env_from(env_str: &str) {
if let Ok(env) = serde_json::from_str::<AppFlowyEnv>(env_str) {
env.supabase_config.write_env();
env.appflowy_cloud_config.write_env();

View File

@ -163,5 +163,5 @@ pub extern "C" fn backend_log(level: i64, data: *const c_char) {
pub extern "C" fn set_env(data: *const c_char) {
let c_str = unsafe { CStr::from_ptr(data) };
let serde_str = c_str.to_str().unwrap();
AppFlowyEnv::parser(serde_str);
AppFlowyEnv::write_env_from(serde_str);
}