fix: s3 cache is an instance settings (#3421)

* s3

* s3
This commit is contained in:
Ruben Fiszel
2024-03-15 15:09:05 +01:00
committed by GitHub
parent 43cd5c3b06
commit 543d2a1577
11 changed files with 99 additions and 67 deletions

View File

@@ -51,7 +51,7 @@ const RELATIVE_PYTHON_LOADER: &str = include_str!("../loader.py");
use crate::global_cache::{build_tar_and_push, pull_from_tar};
#[cfg(feature = "enterprise")]
use crate::S3_CACHE_BUCKET;
use windmill_common::s3_helpers::S3_CACHE_BUCKET;
use crate::{
common::{
@@ -779,7 +779,7 @@ pub async fn handle_python_reqs(
}
#[cfg(feature = "enterprise")]
if let Some(ref bucket) = *S3_CACHE_BUCKET {
if let Some(ref bucket) = S3_CACHE_BUCKET.read().await.clone() {
if matches!(get_license_plan().await, LicensePlan::Pro) {
tracing::warn!("S3 cache not available in the pro plan");
} else {
@@ -922,7 +922,7 @@ pub async fn handle_python_reqs(
child?;
#[cfg(feature = "enterprise")]
if let Some(ref bucket) = *S3_CACHE_BUCKET {
if let Some(bucket) = S3_CACHE_BUCKET.read().await.clone() {
if matches!(get_license_plan().await, LicensePlan::Pro) {
tracing::warn!("S3 cache not available in the pro plan");
} else {