fix: decrease database connections of workers to 3

This commit is contained in:
Ruben Fiszel
2024-02-04 18:32:14 +01:00
parent 44ffba5d90
commit 2c4eb46e65
3 changed files with 6 additions and 1 deletions
@@ -21,12 +21,14 @@ pub fn global_service() -> Router {
Router::new()
}
#[cfg(feature = "enterprise")]
#[derive(Serialize)]
pub struct ConcurrencyGroups {
concurrency_id: String,
job_uuids: Vec<String>,
}
#[cfg(feature = "enterprise")]
async fn list_concurrency_groups(
authed: ApiAuthed,
Extension(db): Extension<DB>,
@@ -66,6 +68,7 @@ async fn list_concurrency_groups(
return Ok(Json(concurrency_groups));
}
#[cfg(feature = "enterprise")]
async fn delete_concurrency_group(
authed: ApiAuthed,
Extension(db): Extension<DB>,
+2
View File
@@ -54,11 +54,13 @@ pub fn workspaced_service() -> Router {
Router::new().route("/token/:audience", post(gen_token))
}
#[cfg(feature = "enterprise")]
#[derive(Debug, Clone, serde::Serialize)]
struct Keys {
private_key: String,
}
#[cfg(feature = "enterprise")]
async fn gen_pems(db: &DB) -> anyhow::Result<Keys> {
let private_key_cmd = Command::new("openssl")
.arg("genrsa")
+1 -1
View File
@@ -42,7 +42,7 @@ pub mod workspaces;
pub mod tracing_init;
pub const DEFAULT_MAX_CONNECTIONS_SERVER: u32 = 50;
pub const DEFAULT_MAX_CONNECTIONS_WORKER: u32 = 5;
pub const DEFAULT_MAX_CONNECTIONS_WORKER: u32 = 3;
lazy_static::lazy_static! {
pub static ref METRICS_PORT: u16 = std::env::var("METRICS_PORT")