From 276cd6dac39b7cb181ac46e3edea79a3a3bcff8d Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Thu, 31 Aug 2023 11:00:45 +0200 Subject: [PATCH] feat: add workspace variable to worker tag --- backend/windmill-queue/src/jobs.rs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/backend/windmill-queue/src/jobs.rs b/backend/windmill-queue/src/jobs.rs index 63b0b98912..32b26060cf 100644 --- a/backend/windmill-queue/src/jobs.rs +++ b/backend/windmill-queue/src/jobs.rs @@ -1654,12 +1654,13 @@ pub async fn push<'c, R: rsmq_async::RsmqConnection + Send + 'c>( "deno".to_string() } }; - tag.unwrap_or_else(|| { - language - .as_ref() - .map(|x| x.as_str().replace("$workspace", workspace_id)) - .unwrap_or_else(default) - }) + tag.map(|x| x.as_str().replace("$workspace", workspace_id).to_string()) + .unwrap_or_else(|| { + language + .as_ref() + .map(|x| x.as_str().to_string()) + .unwrap_or_else(default) + }) }; let mut tx = match tx {