diff --git a/backend/.sqlx/query-388b3705f641621b0c2f4496e36cb7aa5a75b7e40fa312eff6590e54b02635a2.json b/backend/.sqlx/query-388b3705f641621b0c2f4496e36cb7aa5a75b7e40fa312eff6590e54b02635a2.json new file mode 100644 index 0000000000..48f8d1e10c --- /dev/null +++ b/backend/.sqlx/query-388b3705f641621b0c2f4496e36cb7aa5a75b7e40fa312eff6590e54b02635a2.json @@ -0,0 +1,20 @@ +{ + "db_name": "PostgreSQL", + "query": "SELECT EXISTS(SELECT 1 FROM metrics WHERE id = 'license_key_renewal' AND created_at > NOW() - INTERVAL '24 hours')", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "exists", + "type_info": "Bool" + } + ], + "parameters": { + "Left": [] + }, + "nullable": [ + null + ] + }, + "hash": "388b3705f641621b0c2f4496e36cb7aa5a75b7e40fa312eff6590e54b02635a2" +} diff --git a/backend/ee-repo-ref.txt b/backend/ee-repo-ref.txt index 7fd205b782..c2d0f0dd53 100644 --- a/backend/ee-repo-ref.txt +++ b/backend/ee-repo-ref.txt @@ -1 +1 @@ -636634202618e4b6a7fd20117d811f15cfbf9311 \ No newline at end of file +534f50aae2f89281304b3c3ba943d18afc07fad4 \ No newline at end of file diff --git a/backend/src/monitor.rs b/backend/src/monitor.rs index 17a8133ff7..39cfc1ce51 100644 --- a/backend/src/monitor.rs +++ b/backend/src/monitor.rs @@ -1045,7 +1045,7 @@ pub async fn monitor_db( let worker_groups_alerts_f = async { #[cfg(feature = "enterprise")] - if server_mode { + if server_mode && !initial_load { worker_groups_alerts(&db).await; } }; diff --git a/backend/windmill-api/src/settings.rs b/backend/windmill-api/src/settings.rs index b65b76ec93..3b58118d45 100644 --- a/backend/windmill-api/src/settings.rs +++ b/backend/windmill-api/src/settings.rs @@ -355,7 +355,7 @@ pub async fn renew_license_key( ) -> Result { require_super_admin(&db, &authed.email).await?; windmill_common::stats_ee::send_stats(&"manual".to_string(), &HTTP_CLIENT, &db).await?; - let result = windmill_common::ee::renew_license_key(&HTTP_CLIENT, &db, license_key).await; + let result = windmill_common::ee::renew_license_key(&HTTP_CLIENT, &db, license_key, true).await; if result != "success" { return Err(error::Error::BadRequest(format!( diff --git a/backend/windmill-common/src/ee.rs b/backend/windmill-common/src/ee.rs index dce2d4ee4a..9b44ddad26 100644 --- a/backend/windmill-common/src/ee.rs +++ b/backend/windmill-common/src/ee.rs @@ -48,6 +48,7 @@ pub async fn renew_license_key( _http_client: &reqwest::Client, _db: &crate::db::DB, _key: Option, + _manual: bool, ) -> String { // Implementation is not open source "".to_string() diff --git a/backend/windmill-worker/src/worker.rs b/backend/windmill-worker/src/worker.rs index b794504bf7..5dc4a79bd2 100644 --- a/backend/windmill-worker/src/worker.rs +++ b/backend/windmill-worker/src/worker.rs @@ -40,6 +40,8 @@ use std::{ }, time::Duration, }; +#[cfg(feature = "benchmark")] +use std::sync::atomic::AtomicUsize; #[cfg(feature = "benchmark")] use std::sync::atomic::AtomicUsize;