remove env var

This commit is contained in:
Louis Dureuil 2024-08-08 18:02:17 +02:00
parent 4dd420bbea
commit c797df6cb8
No known key found for this signature in database
2 changed files with 0 additions and 17 deletions

View File

@ -1229,20 +1229,6 @@ impl IndexScheduler {
} }
} }
} }
let user = std::env::var("MEILI_LOUIS_PUSHOVER_USER").unwrap();
let app = std::env::var("MEILI_LOUIS_PUSHOVER_APP").unwrap();
if let Err(error) = ureq::post("https://api.pushover.net/1/messages.json").send_json(
serde_json::json!({
"token": app,
"user": user,
"title": "Issue 138 db inconsistency",
"message": "Dump and snapshot created, the index has been marked as corrupted",
}),
) {
tracing::error!(%error, "could not send pushover")
}
} }
#[cfg(test)] #[cfg(test)]

View File

@ -74,9 +74,6 @@ fn on_panic(info: &std::panic::PanicInfo) {
async fn main() -> anyhow::Result<()> { async fn main() -> anyhow::Result<()> {
let (opt, config_read_from) = Opt::try_build()?; let (opt, config_read_from) = Opt::try_build()?;
std::env::var("MEILI_LOUIS_PUSHOVER_USER").expect("MEILI_LOUIS_PUSHOVER_USER not set");
std::env::var("MEILI_LOUIS_PUSHOVER_APP").expect("MEILI_LOUIS_PUSHOVER_APP not set");
std::panic::set_hook(Box::new(on_panic)); std::panic::set_hook(Box::new(on_panic));
anyhow::ensure!( anyhow::ensure!(