Skip to content

Commit

Permalink
fix: add WM_WORKER_GROUP to get worker group from script
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenfiszel committed May 1, 2024
1 parent 28cc826 commit 0855cdd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion backend/windmill-common/src/variables.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use magic_crypt::{MagicCrypt256, MagicCryptTrait};
use serde::{Deserialize, Serialize};
use sqlx::{Postgres, Transaction};

use crate::{BASE_URL, DB};
use crate::{worker::WORKER_GROUP, BASE_URL, DB};

lazy_static::lazy_static! {
pub static ref SECRET_SALT: Option<String> = std::env::var("SECRET_SALT").ok();
Expand Down Expand Up @@ -300,6 +300,12 @@ pub async fn get_reserved_variables(
description: "OIDC JWT token (EE only)".to_string(),
is_custom: false,
},
ContextualVariable {
name: "WM_WORKER_GROUP".to_string(),
value: WORKER_GROUP.clone(),
description: "name of the worker group the job is running on".to_string(),
is_custom: false,
},
].into_iter().chain( sqlx::query_as::<_, (String, String)>(
"SELECT name, value FROM workspace_env WHERE workspace_id = $1",
)
Expand Down

0 comments on commit 0855cdd

Please sign in to comment.