Skip to content

Commit

Permalink
feat: failed key renewal alert + renew on start if no recent renewal (#…
Browse files Browse the repository at this point in the history
…4387)

* feat: failed key renewal alert + renew on start if no recent renewal

* Update ee-repo-ref.txt
  • Loading branch information
HugoCasa authored Sep 16, 2024
1 parent 6ba77d5 commit de78f6c
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 3 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion backend/ee-repo-ref.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
636634202618e4b6a7fd20117d811f15cfbf9311
534f50aae2f89281304b3c3ba943d18afc07fad4
2 changes: 1 addition & 1 deletion backend/src/monitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
};
Expand Down
2 changes: 1 addition & 1 deletion backend/windmill-api/src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ pub async fn renew_license_key(
) -> Result<String> {
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!(
Expand Down
1 change: 1 addition & 0 deletions backend/windmill-common/src/ee.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ pub async fn renew_license_key(
_http_client: &reqwest::Client,
_db: &crate::db::DB,
_key: Option<String>,
_manual: bool,
) -> String {
// Implementation is not open source
"".to_string()
Expand Down
2 changes: 2 additions & 0 deletions backend/windmill-worker/src/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ use std::{
},
time::Duration,
};
#[cfg(feature = "benchmark")]
use std::sync::atomic::AtomicUsize;

#[cfg(feature = "benchmark")]
use std::sync::atomic::AtomicUsize;
Expand Down

0 comments on commit de78f6c

Please sign in to comment.