Browse Source

Remove unused runtime args from examples

tags/v0.3.2-rc0
haixuanTao 2 years ago
parent
commit
f85011837d
8 changed files with 2 additions and 97 deletions
  1. +0
    -12
      examples/benchmark/run.rs
  2. +0
    -11
      examples/c++-dataflow/run.rs
  3. +0
    -12
      examples/c-dataflow/run.rs
  4. +0
    -11
      examples/cmake-dataflow/run.rs
  5. +2
    -16
      examples/multiple-daemons/run.rs
  6. +0
    -11
      examples/rust-dataflow-url/run.rs
  7. +0
    -12
      examples/rust-dataflow/run.rs
  8. +0
    -12
      examples/rust-ros2-dataflow/run.rs

+ 0
- 12
examples/benchmark/run.rs View File

@@ -2,20 +2,8 @@ use dora_tracing::set_up_tracing;
use eyre::{bail, Context};
use std::path::Path;

#[derive(Debug, Clone, clap::Parser)]
pub struct Args {
#[clap(long)]
pub run_dora_runtime: bool,
}

#[tokio::main]
async fn main() -> eyre::Result<()> {
let Args { run_dora_runtime } = clap::Parser::parse();

if run_dora_runtime {
return tokio::task::block_in_place(dora_daemon::run_dora_runtime);
}

set_up_tracing("benchmark-runner").wrap_err("failed to set up tracing subscriber")?;

let root = Path::new(env!("CARGO_MANIFEST_DIR"));


+ 0
- 11
examples/c++-dataflow/run.rs View File

@@ -5,19 +5,8 @@ use std::{
path::Path,
};

#[derive(Debug, Clone, clap::Parser)]
pub struct Args {
#[clap(long)]
pub run_dora_runtime: bool,
}

#[tokio::main]
async fn main() -> eyre::Result<()> {
let Args { run_dora_runtime } = clap::Parser::parse();

if run_dora_runtime {
return tokio::task::block_in_place(dora_daemon::run_dora_runtime);
}
set_up_tracing("c++-dataflow-runner").wrap_err("failed to set up tracing")?;

if cfg!(windows) {


+ 0
- 12
examples/c-dataflow/run.rs View File

@@ -5,20 +5,8 @@ use std::{
path::Path,
};

#[derive(Debug, Clone, clap::Parser)]
pub struct Args {
#[clap(long)]
pub run_dora_runtime: bool,
}

#[tokio::main]
async fn main() -> eyre::Result<()> {
let Args { run_dora_runtime } = clap::Parser::parse();

if run_dora_runtime {
return tokio::task::block_in_place(dora_daemon::run_dora_runtime);
}

set_up_tracing("c-dataflow-runner").wrap_err("failed to set up tracing")?;

let root = Path::new(env!("CARGO_MANIFEST_DIR"));


+ 0
- 11
examples/cmake-dataflow/run.rs View File

@@ -2,19 +2,8 @@ use dora_tracing::set_up_tracing;
use eyre::{bail, Context};
use std::path::Path;

#[derive(Debug, Clone, clap::Parser)]
pub struct Args {
#[clap(long)]
pub run_dora_runtime: bool,
}

#[tokio::main]
async fn main() -> eyre::Result<()> {
let Args { run_dora_runtime } = clap::Parser::parse();

if run_dora_runtime {
return tokio::task::block_in_place(dora_daemon::run_dora_runtime);
}
set_up_tracing("cmake-dataflow-runner").wrap_err("failed to set up tracing")?;

if cfg!(windows) {


+ 2
- 16
examples/multiple-daemons/run.rs View File

@@ -22,19 +22,8 @@ use tokio::{
use tokio_stream::wrappers::ReceiverStream;
use uuid::Uuid;

#[derive(Debug, Clone, clap::Parser)]
pub struct Args {
#[clap(long)]
pub run_dora_runtime: bool,
}

#[tokio::main]
async fn main() -> eyre::Result<()> {
let Args { run_dora_runtime } = clap::Parser::parse();
if run_dora_runtime {
return tokio::task::block_in_place(dora_daemon::run_dora_runtime);
}

set_up_tracing("multiple-daemon-runner").wrap_err("failed to set up tracing subscriber")?;

let root = Path::new(env!("CARGO_MANIFEST_DIR"));
@@ -45,11 +34,8 @@ async fn main() -> eyre::Result<()> {
build_dataflow(dataflow).await?;

let (coordinator_events_tx, coordinator_events_rx) = mpsc::channel(1);
let (coordinator_port, coordinator) = dora_coordinator::start(
dora_coordinator::Args { port: Some(0) },
ReceiverStream::new(coordinator_events_rx),
)
.await?;
let (coordinator_port, coordinator) =
dora_coordinator::start(Some(0), ReceiverStream::new(coordinator_events_rx)).await?;
let coordinator_addr = SocketAddr::new(Ipv4Addr::LOCALHOST.into(), coordinator_port);
let daemon_a = dora_daemon::Daemon::run(coordinator_addr, "A".into(), stream::empty());
let daemon_b = dora_daemon::Daemon::run(coordinator_addr, "B".into(), stream::empty());


+ 0
- 11
examples/rust-dataflow-url/run.rs View File

@@ -2,19 +2,8 @@ use dora_tracing::set_up_tracing;
use eyre::{bail, Context};
use std::path::Path;

#[derive(Debug, Clone, clap::Parser)]
pub struct Args {
#[clap(long)]
pub run_dora_runtime: bool,
}

#[tokio::main]
async fn main() -> eyre::Result<()> {
let Args { run_dora_runtime } = clap::Parser::parse();
if run_dora_runtime {
return tokio::task::block_in_place(dora_daemon::run_dora_runtime);
}

set_up_tracing("rust-dataflow-url-runner").wrap_err("failed to set up tracing")?;

let root = Path::new(env!("CARGO_MANIFEST_DIR"));


+ 0
- 12
examples/rust-dataflow/run.rs View File

@@ -2,20 +2,8 @@ use dora_tracing::set_up_tracing;
use eyre::{bail, Context};
use std::path::Path;

#[derive(Debug, Clone, clap::Parser)]
pub struct Args {
#[clap(long)]
pub run_dora_runtime: bool,
}

#[tokio::main]
async fn main() -> eyre::Result<()> {
let Args { run_dora_runtime } = clap::Parser::parse();

if run_dora_runtime {
return tokio::task::block_in_place(dora_daemon::run_dora_runtime);
}

set_up_tracing("rust-dataflow-runner").wrap_err("failed to set up tracing subscriber")?;

let root = Path::new(env!("CARGO_MANIFEST_DIR"));


+ 0
- 12
examples/rust-ros2-dataflow/run.rs View File

@@ -2,20 +2,8 @@ use dora_tracing::set_up_tracing;
use eyre::{bail, Context};
use std::path::Path;

#[derive(Debug, Clone, clap::Parser)]
pub struct Args {
#[clap(long)]
pub run_dora_runtime: bool,
}

#[tokio::main]
async fn main() -> eyre::Result<()> {
let Args { run_dora_runtime } = clap::Parser::parse();

if run_dora_runtime {
return tokio::task::block_in_place(dora_daemon::run_dora_runtime);
}

set_up_tracing("rust-ros2-dataflow-runner").wrap_err("failed to set up tracing subscriber")?;

let root = Path::new(env!("CARGO_MANIFEST_DIR"));


Loading…
Cancel
Save