From b79172c9bcfcf934a8a4c719aa93591026099106 Mon Sep 17 00:00:00 2001 From: haixuanTao Date: Fri, 19 Jan 2024 14:22:29 +0100 Subject: [PATCH] Removing `coordinator_addr` for `run_dataflow` command --- binaries/cli/src/main.rs | 13 +++++++------ binaries/daemon/src/lib.rs | 10 +++------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/binaries/cli/src/main.rs b/binaries/cli/src/main.rs index cc71e1988..ab6383bfe 100644 --- a/binaries/cli/src/main.rs +++ b/binaries/cli/src/main.rs @@ -275,13 +275,14 @@ fn run() -> eyre::Result<()> { match run_dataflow { Some(dataflow_path) => { tracing::info!("Starting dataflow `{}`", dataflow_path.display()); + if let Some(coordinator_addr) = coordinator_addr { + tracing::info!( + "Not using coordinator addr {} as `run_dataflow` is for local dataflow only. Please use the `start` command for remote coordinator", + coordinator_addr + ); + } - Daemon::run_dataflow( - &dataflow_path, - coordinator_addr, - machine_id.unwrap_or_default(), - ) - .await + Daemon::run_dataflow(&dataflow_path).await } None => { let addr = coordinator_addr.unwrap_or_else(|| { diff --git a/binaries/daemon/src/lib.rs b/binaries/daemon/src/lib.rs index 9207e47de..1515d3432 100644 --- a/binaries/daemon/src/lib.rs +++ b/binaries/daemon/src/lib.rs @@ -116,11 +116,7 @@ impl Daemon { .map(|_| ()) } - pub async fn run_dataflow( - dataflow_path: &Path, - coordinator_addr: Option, - machine_id: String, - ) -> eyre::Result<()> { + pub async fn run_dataflow(dataflow_path: &Path) -> eyre::Result<()> { let working_dir = dataflow_path .canonicalize() .context("failed to canoncialize dataflow path")? @@ -160,8 +156,8 @@ impl Daemon { }); let run_result = Self::run_general( Box::pin(coordinator_events), - coordinator_addr, - machine_id, + None, + "".to_string(), Some(exit_when_done), clock, );