From 5545edcca7d8d67ef156c924351fd9cb912c160b Mon Sep 17 00:00:00 2001 From: Vika Date: Tue, 28 Sep 2021 01:57:16 +0300 Subject: Modified the module to use BACKEND_URI --- src/database/file/mod.rs | 2 ++ src/frontend/mod.rs | 13 ++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/database/file/mod.rs b/src/database/file/mod.rs index acbb44b..f58317e 100644 --- a/src/database/file/mod.rs +++ b/src/database/file/mod.rs @@ -483,8 +483,10 @@ impl Storage for FileStorage { .create(true) .open(&path).await?; let mut lock = get_lockable_file(file).await; + log::debug!("Created a lock. Locking for writing..."); let mut guard = lock.write()?; + log::debug!("Locked. Writing."); let mut content = String::new(); guard.read_to_string(&mut content).await?; let mut settings: HashMap = if content.len() == 0 { diff --git a/src/frontend/mod.rs b/src/frontend/mod.rs index 37420ac..890879c 100644 --- a/src/frontend/mod.rs +++ b/src/frontend/mod.rs @@ -120,6 +120,8 @@ struct OnboardingData { pub async fn onboarding_receiver(mut req: Request>) -> Result { use serde_json::json; + log::debug!("Entering onboarding receiver..."); + // This cannot error out as the URL must be valid. Or there is something horribly wrong // and we shouldn't serve this request anyway. >::as_mut(&mut req) @@ -127,7 +129,9 @@ pub async fn onboarding_receiver(mut req: Request().await?; + log::debug!("Body parsed!"); let backend = &req.state().storage; #[cfg(any(not(debug_assertions), test))] @@ -135,6 +139,8 @@ pub async fn onboarding_receiver(mut req: Request(mut req: Request(mut req: Request(mut req: Request