Add some logging around synchronization

This commit is contained in:
Jeremy Wall 2023-01-07 20:02:49 -05:00
parent 9ac61731f7
commit ae7aea8c5b

View File

@ -161,6 +161,7 @@ impl StateMachine {
state.recipes = recipes; state.recipes = recipes;
}; };
info!("Synchronizing staples");
state.staples = if let Some(content) = store.fetch_staples().await? { state.staples = if let Some(content) = store.fetch_staples().await? {
local_store.set_staples(&content); local_store.set_staples(&content);
// now we need to parse staples as ingredients // now we need to parse staples as ingredients
@ -179,6 +180,7 @@ impl StateMachine {
local_store.set_all_recipes(recipe_entries); local_store.set_all_recipes(recipe_entries);
} }
info!("Synchronizing meal plan");
let plan = store.fetch_plan().await?; let plan = store.fetch_plan().await?;
if let Some(plan) = plan { if let Some(plan) = plan {
// set the counts. // set the counts.