Skip to content

Commit

Permalink
Switched environment variable to external API url
Browse files Browse the repository at this point in the history
  • Loading branch information
johannwagner committed Nov 23, 2023
1 parent a8e535a commit e4628f5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions vicky-worker/Rocket.example.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[default]

vicky_url = ""
vicky_external_url = "https://vicky.lab.wobcom.de"
machine_token = ""
3 changes: 2 additions & 1 deletion vicky-worker/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ use rocket::figment::providers::{Toml, Env, Format};
#[derive(Deserialize)]
pub(crate) struct AppConfig {
pub(crate) vicky_url: String,
pub(crate) vicky_external_url: String,
pub(crate) machine_token: String,
}

Expand Down Expand Up @@ -113,7 +114,7 @@ async fn try_run_task(cfg: Arc<AppConfig>, task: &Task) -> anyhow::Result<()> {

let mut child = Command::new("nix")
.args(args)
.env("VICKY_API_URL", &cfg.vicky_url)
.env("VICKY_API_URL", &cfg.vicky_external_url)
.env("VICKY_MACHINE_TOKEN", &cfg.machine_token)
.kill_on_drop(true)
.stdin(Stdio::null())
Expand Down

0 comments on commit e4628f5

Please sign in to comment.