From 142f164f92737f328821237df012559d82c56bd7 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Mon, 8 Jan 2024 06:37:08 +0100 Subject: [PATCH] fix script deployment --- backend/windmill-api/src/scripts.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/windmill-api/src/scripts.rs b/backend/windmill-api/src/scripts.rs index f7ce0cf421..778df43c0b 100644 --- a/backend/windmill-api/src/scripts.rs +++ b/backend/windmill-api/src/scripts.rs @@ -604,8 +604,6 @@ async fn create_script( ); } - let tx = PushIsolationLevel::Transaction(tx); - let permissioned_as = username_to_permissioned_as(&authed.username); if needs_lock_gen { let tag = if ns.dedicated_worker.is_some_and(|x| x) { @@ -613,6 +611,7 @@ async fn create_script( } else { ns.tag }; + let tx = PushIsolationLevel::Transaction(tx); let (_, new_tx) = windmill_queue::push( &db, tx, @@ -655,6 +654,7 @@ async fn create_script( rsmq, ) .await?; + tx.commit().await?; } Ok((StatusCode::CREATED, format!("{}", hash)))