Skip to content

Commit

Permalink
fix issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Hennzau committed Sep 10, 2024
1 parent 69f0526 commit ed35332
Showing 1 changed file with 21 additions and 14 deletions.
35 changes: 21 additions & 14 deletions binaries/coordinator/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -425,24 +425,31 @@ async fn start_inner(
},
ControlRequest::Logs { uuid, name, node } => {
let dataflow_uuid = if let Some(uuid) = uuid {
uuid
Ok(uuid)
} else if let Some(name) = name {
resolve_name(name, &running_dataflows, &archived_dataflows)?
resolve_name(name, &running_dataflows, &archived_dataflows)
} else {
bail!("No uuid")
Err(eyre!("No uuid"))
};

let reply = retrieve_logs(
&running_dataflows,
&archived_dataflows,
dataflow_uuid,
node.into(),
&mut daemon_connections,
clock.new_timestamp(),
)
.await
.map(ControlRequestReply::Logs);
let _ = reply_sender.send(reply);
match dataflow_uuid {
Ok(uuid) => {
let reply = retrieve_logs(
&running_dataflows,
&archived_dataflows,
uuid,
node.into(),
&mut daemon_connections,
clock.new_timestamp(),
)
.await
.map(ControlRequestReply::Logs);
let _ = reply_sender.send(reply);
}
Err(err) => {
let _ = reply_sender.send(Err(err));
}
}
}
ControlRequest::Destroy => {
tracing::info!("Received destroy command");
Expand Down

0 comments on commit ed35332

Please sign in to comment.