mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-18 16:02:10 +00:00
make OUTSTANDING_WAITING_TIME_TS configurable
This commit is contained in:
@@ -367,6 +367,10 @@ lazy_static::lazy_static! {
|
||||
.and_then(|x| x.parse().ok())
|
||||
.unwrap_or(false);
|
||||
|
||||
pub static ref OUTSTANDING_WAIT_TIME_THRESHOLD_MS: i64 = std::env::var("OUTSTANDING_WAIT_TIME_THRESHOLD_MS")
|
||||
.ok()
|
||||
.and_then(|x| x.parse::<i64>().ok())
|
||||
.unwrap_or(1000);
|
||||
}
|
||||
|
||||
type Envs = Vec<(String, String)>;
|
||||
@@ -588,8 +592,6 @@ pub async fn drop_cache() {
|
||||
}
|
||||
}
|
||||
|
||||
const OUTSTANDING_WAIT_TIME_THRESHOLD_MS: i64 = 1000;
|
||||
|
||||
async fn insert_wait_time(
|
||||
job_id: Uuid,
|
||||
root_job_id: Option<Uuid>,
|
||||
@@ -1620,7 +1622,7 @@ pub async fn run_worker(
|
||||
.expect("send job completed END");
|
||||
add_time!(bench, "sent job completed");
|
||||
} else {
|
||||
add_outstanding_wait_time(&conn, &job, OUTSTANDING_WAIT_TIME_THRESHOLD_MS);
|
||||
add_outstanding_wait_time(&conn, &job, *OUTSTANDING_WAIT_TIME_THRESHOLD_MS);
|
||||
|
||||
#[cfg(feature = "prometheus")]
|
||||
register_metric(
|
||||
|
||||
Reference in New Issue
Block a user