Skip to content

Commit b2d9f7d

Browse files
committed
add cloud compile flag
1 parent 4f8d442 commit b2d9f7d

File tree

5 files changed

+8
-6
lines changed

5 files changed

+8
-6
lines changed

.github/workflows/docker-image.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ jobs:
136136
platforms: linux/amd64,linux/arm64
137137
push: true
138138
build-args: |
139-
features=enterprise,enterprise_saml,stripe,embedding,parquet,prometheus,openidconnect
139+
features=enterprise,enterprise_saml,stripe,embedding,parquet,prometheus,openidconnect,cloud
140140
tags: |
141141
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-ee:dev
142142
${{ steps.meta-ee-public.outputs.tags }}
@@ -199,7 +199,7 @@ jobs:
199199
platforms: linux/amd64
200200
push: true
201201
build-args: |
202-
features=enterprise,enterprise_saml,stripe,embedding,parquet,prometheus,openidconnect
202+
features=enterprise,enterprise_saml,stripe,embedding,parquet,prometheus,openidconnect,cloud
203203
PYTHON_IMAGE=python:3.12.2-slim-bookworm
204204
tags: |
205205
${{ steps.meta-ee-public-py312.outputs.tags }}

backend/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ parquet = ["windmill-api/parquet", "windmill-common/parquet", "windmill-worker/p
5050
prometheus = ["windmill-common/prometheus", "windmill-api/prometheus", "windmill-worker/prometheus", "windmill-queue/prometheus"]
5151
flow_testing = ["windmill-worker/flow_testing"]
5252
openidconnect = ["windmill-api/openidconnect"]
53+
cloud = ["windmill-queue/cloud"]
5354

5455
[dependencies]
5556
anyhow.workspace = true

backend/windmill-queue/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ path = "src/lib.rs"
1111
[features]
1212
default = []
1313
enterprise = ["windmill-common/enterprise"]
14+
cloud = []
1415
benchmark = []
1516
prometheus = ["dep:prometheus"]
1617

backend/windmill-queue/src/jobs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ pub async fn add_completed_job<
699699
queued_job.id
700700
);
701701

702-
#[cfg(feature = "enterprise")]
702+
#[cfg(feature = "cloud")]
703703
if *CLOUD_HOSTED && !queued_job.is_flow() && _duration > 1000 {
704704
let additional_usage = _duration / 1000;
705705
let w_id = &queued_job.workspace_id;
@@ -2624,7 +2624,7 @@ pub async fn push<'c, T: Serialize + Send + Sync, R: rsmq_async::RsmqConnection
26242624
flow_step_id: Option<String>,
26252625
_priority_override: Option<i16>,
26262626
) -> Result<(Uuid, QueueTransaction<'c, R>), Error> {
2627-
#[cfg(feature = "enterprise")]
2627+
#[cfg(feature = "cloud")]
26282628
if *CLOUD_HOSTED {
26292629
let premium_workspace =
26302630
sqlx::query_scalar!("SELECT premium FROM workspace WHERE id = $1", workspace_id)

backend/windmill-worker/src/common.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1160,7 +1160,7 @@ pub async fn resolve_job_timeout(
11601160
custom_timeout_secs: Option<i32>,
11611161
) -> (Duration, Option<String>) {
11621162
let mut warn_msg: Option<String> = None;
1163-
#[cfg(feature = "enterprise")]
1163+
#[cfg(feature = "cloud")]
11641164
let cloud_premium_workspace = *CLOUD_HOSTED
11651165
&& sqlx::query_scalar!("SELECT premium FROM workspace WHERE id = $1", _w_id)
11661166
.fetch_one(_db)
@@ -1169,7 +1169,7 @@ pub async fn resolve_job_timeout(
11691169
tracing::error!(%e, "error getting premium workspace for job {_job_id}: {e}");
11701170
})
11711171
.unwrap_or(false);
1172-
#[cfg(not(feature = "enterprise"))]
1172+
#[cfg(not(feature = "cloud"))]
11731173
let cloud_premium_workspace = false;
11741174

11751175
// compute global max timeout

0 commit comments

Comments
 (0)