Skip to content

Commit

Permalink
increment writer IDs on each new writer
Browse files Browse the repository at this point in the history
  • Loading branch information
ifd3f committed May 29, 2024
1 parent e47f585 commit d3e1c96
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ui/herder/herder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ pub struct Herder {
socket: HerderSocket,
log_paths: Arc<LogPaths>,
escalated_daemon: Option<ChildHandle>,
next_writer_id: u64,
}

impl Herder {
Expand All @@ -36,6 +37,7 @@ impl Herder {
socket,
escalated_daemon: None,
log_paths,
next_writer_id: 0,
}
}

Expand Down Expand Up @@ -74,7 +76,8 @@ impl Herder {
args: &WriterProcessConfig,
escalate: bool,
) -> anyhow::Result<WriterHandle> {
let log_path = self.log_paths.writer(0);
let log_path = self.log_paths.writer(self.next_writer_id);
self.next_writer_id += 1;

let child = if escalate {
let daemon = self.ensure_escalated_daemon().await?;
Expand Down

0 comments on commit d3e1c96

Please sign in to comment.