Remove code paths that skip LLM db in prod (#16008)

Release Notes:

- N/A
This commit is contained in:
Max Brunsfeld 2024-08-09 07:41:50 -07:00 committed by GitHub
parent c1872e9cb0
commit 225726ba4a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 33 additions and 52 deletions

View file

@ -248,11 +248,6 @@ async fn setup_app_database(config: &Config) -> Result<()> {
}
async fn setup_llm_database(config: &Config) -> Result<()> {
// TODO: This is temporary until we have the LLM database stood up.
if !config.is_development() {
return Ok(());
}
let database_url = config
.llm_database_url
.as_ref()
@ -298,7 +293,12 @@ async fn handle_liveness_probe(
state.db.get_all_users(0, 1).await?;
}
if let Some(_llm_state) = llm_state {}
if let Some(llm_state) = llm_state {
llm_state
.db
.get_active_user_count(chrono::Utc::now())
.await?;
}
Ok("ok".to_string())
}