chore: remove extra logs
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
@@ -31,7 +31,6 @@ impl IntoCommand for BatchCommand {
|
||||
for command in self.commands {
|
||||
let msg = command.execute(dispatch.clone());
|
||||
if let Some(msg) = msg {
|
||||
tracing::info!("executing batch command for msg: {:?}", msg);
|
||||
dispatch.send(msg);
|
||||
}
|
||||
}
|
||||
|
@@ -6,8 +6,6 @@ use crate::{
|
||||
state::SharedState,
|
||||
};
|
||||
|
||||
use super::IntoCommand;
|
||||
|
||||
pub struct UpdateGraphCommand {
|
||||
querier: Querier,
|
||||
}
|
||||
@@ -26,11 +24,6 @@ impl UpdateGraphCommand {
|
||||
let now = std::time::SystemTime::now();
|
||||
dispatch.send(Msg::GraphUpdated(GraphUpdatedEvent::Initiated));
|
||||
|
||||
#[cfg(debug_assertions)]
|
||||
{
|
||||
tokio::time::sleep(std::time::Duration::from_secs(1)).await;
|
||||
}
|
||||
|
||||
match self
|
||||
.querier
|
||||
.get_async(&root, path)
|
||||
@@ -38,6 +31,15 @@ impl UpdateGraphCommand {
|
||||
.ok_or(anyhow::anyhow!("failed to find path"))
|
||||
{
|
||||
Ok(graph) => {
|
||||
dispatch.send(Msg::GraphUpdated(GraphUpdatedEvent::Optimistic(
|
||||
graph.clone(),
|
||||
)));
|
||||
|
||||
#[cfg(debug_assertions)]
|
||||
{
|
||||
tokio::time::sleep(std::time::Duration::from_secs(1)).await;
|
||||
}
|
||||
|
||||
dispatch.send(Msg::GraphUpdated(GraphUpdatedEvent::Success(graph)))
|
||||
}
|
||||
Err(e) => dispatch.send(Msg::GraphUpdated(GraphUpdatedEvent::Failure(
|
||||
|
@@ -65,6 +65,10 @@ impl<'a> GraphExplorerState<'a> {
|
||||
GraphUpdatedEvent::Failure(e) => {
|
||||
tracing::error!("graph update failed: {}", e);
|
||||
}
|
||||
GraphUpdatedEvent::Optimistic(graph) => {
|
||||
tracing::trace!("graph updated optimistically");
|
||||
self.graph = Some(graph.clone());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -27,6 +27,7 @@ pub enum Msg {
|
||||
#[derive(Debug)]
|
||||
pub enum GraphUpdatedEvent {
|
||||
Initiated,
|
||||
Optimistic(GraphItem),
|
||||
Success(GraphItem),
|
||||
Failure(String),
|
||||
}
|
||||
|
Reference in New Issue
Block a user