examples: unify demo env vars

This commit is contained in:
andrussal 2025-12-18 09:26:47 +01:00
parent 29d9b40d72
commit d5940c3192
3 changed files with 9 additions and 36 deletions

View File

@ -40,20 +40,11 @@ async fn main() {
tracing_subscriber::fmt::init();
let validators = read_env_any(
&["NOMOS_DEMO_VALIDATORS", "COMPOSE_DEMO_VALIDATORS"],
DEFAULT_VALIDATORS,
);
let validators = read_env_any(&["NOMOS_DEMO_VALIDATORS"], DEFAULT_VALIDATORS);
let executors = read_env_any(
&["NOMOS_DEMO_EXECUTORS", "COMPOSE_DEMO_EXECUTORS"],
DEFAULT_EXECUTORS,
);
let executors = read_env_any(&["NOMOS_DEMO_EXECUTORS"], DEFAULT_EXECUTORS);
let run_secs = read_env_any(
&["NOMOS_DEMO_RUN_SECS", "COMPOSE_DEMO_RUN_SECS"],
DEFAULT_RUN_SECS,
);
let run_secs = read_env_any(&["NOMOS_DEMO_RUN_SECS"], DEFAULT_RUN_SECS);
info!(
validators,

View File

@ -21,18 +21,9 @@ const DA_BLOB_RATE: u64 = 1;
async fn main() {
tracing_subscriber::fmt::init();
let validators = read_env_any(
&["NOMOS_DEMO_VALIDATORS", "K8S_DEMO_VALIDATORS"],
DEFAULT_VALIDATORS,
);
let executors = read_env_any(
&["NOMOS_DEMO_EXECUTORS", "K8S_DEMO_EXECUTORS"],
DEFAULT_EXECUTORS,
);
let run_secs = read_env_any(
&["NOMOS_DEMO_RUN_SECS", "K8S_DEMO_RUN_SECS"],
DEFAULT_RUN_SECS,
);
let validators = read_env_any(&["NOMOS_DEMO_VALIDATORS"], DEFAULT_VALIDATORS);
let executors = read_env_any(&["NOMOS_DEMO_EXECUTORS"], DEFAULT_EXECUTORS);
let run_secs = read_env_any(&["NOMOS_DEMO_RUN_SECS"], DEFAULT_RUN_SECS);
info!(validators, executors, run_secs, "starting k8s runner demo");
if let Err(err) = run_k8s_case(validators, executors, Duration::from_secs(run_secs)).await {

View File

@ -24,18 +24,9 @@ async fn main() {
process::exit(1);
}
let validators = read_env_any(
&["NOMOS_DEMO_VALIDATORS", "LOCAL_DEMO_VALIDATORS"],
DEFAULT_VALIDATORS,
);
let executors = read_env_any(
&["NOMOS_DEMO_EXECUTORS", "LOCAL_DEMO_EXECUTORS"],
DEFAULT_EXECUTORS,
);
let run_secs = read_env_any(
&["NOMOS_DEMO_RUN_SECS", "LOCAL_DEMO_RUN_SECS"],
DEFAULT_RUN_SECS,
);
let validators = read_env_any(&["NOMOS_DEMO_VALIDATORS"], DEFAULT_VALIDATORS);
let executors = read_env_any(&["NOMOS_DEMO_EXECUTORS"], DEFAULT_EXECUTORS);
let run_secs = read_env_any(&["NOMOS_DEMO_RUN_SECS"], DEFAULT_RUN_SECS);
info!(
validators,