mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-10 08:07:03 +00:00
warn for slow queries in push scheduled job
This commit is contained in:
@@ -246,6 +246,7 @@ pub async fn now_from_db<'c, E: sqlx::PgExecutor<'c>>(
|
||||
) -> Result<chrono::DateTime<chrono::Utc>> {
|
||||
Ok(sqlx::query_scalar!("SELECT now()")
|
||||
.fetch_one(db)
|
||||
.warn_after_seconds_with_sql(1, "now_from_db".to_string())
|
||||
.await?
|
||||
.unwrap())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user