Skip to content

Commit

Permalink
fixed a few typos in run_maintenance_work
Browse files Browse the repository at this point in the history
  • Loading branch information
CommanderStorm committed Oct 6, 2024
1 parent 19e01b2 commit 341697e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,21 +138,21 @@ fn main() -> anyhow::Result<()> {
}
async fn run_maintenance_work(
pool: Pool<Postgres>,
meilisearch_initalised: Arc<RwLock<()>>,
initalisation_started: Arc<Barrier>,
meilisearch_initialised: Arc<RwLock<()>>,
initialisation_started: Arc<Barrier>,
) {
if std::env::var("SKIP_MS_SETUP") != Ok("true".to_string()) {
let _ = debug_span!("updating meilisearch data").enter();
let _ = meilisearch_initalised.write().await;
initalisation_started.wait().await;
let _ = meilisearch_initialised.write().await;
initialisation_started.wait().await;
let ms_url =
std::env::var("MIELI_URL").unwrap_or_else(|_| "http://localhost:7700".to_string());
let client = Client::new(ms_url, std::env::var("MEILI_MASTER_KEY").ok()).unwrap();
setup::meilisearch::setup(&client).await.unwrap();
setup::meilisearch::load_data(&client).await.unwrap();
} else {
info!("skipping the database setup as SKIP_MS_SETUP=true");
initalisation_started.wait().await;
initialisation_started.wait().await;
}
if std::env::var("SKIP_DB_SETUP") != Ok("true".to_string()) {
let _ = debug_span!("updating postgis data").enter();
Expand Down

0 comments on commit 341697e

Please sign in to comment.