From 966373b8fa530c474ab9eaf1422772aa46363592 Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Sat, 11 May 2024 18:51:55 +0200 Subject: [PATCH] add mysql support --- app/Cargo.toml | 2 +- app/src/error.rs | 4 ++-- app/src/main.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Cargo.toml b/app/Cargo.toml index 4c06d83..afa6808 100644 --- a/app/Cargo.toml +++ b/app/Cargo.toml @@ -11,7 +11,7 @@ config = "0.14.0" futures = "0.3.30" reqwest = { version = "0.12.4", features = ["json", "rustls-tls"], default-features = false } rumqttc = "0.24.0" -sea-orm = { workspace = true, features = [ "with-time", "sqlx-sqlite", "sqlx-postgres", "runtime-tokio-rustls", "macros" ] } +sea-orm = { workspace = true, features = [ "with-time", "sqlx-sqlite", "sqlx-postgres", "sqlx-mysql", "runtime-tokio-rustls", "macros" ] } serde = { workspace = true } serde_json = "1.0.116" thiserror = "1.0.59" diff --git a/app/src/error.rs b/app/src/error.rs index 6b8f8a4..dfc91b7 100644 --- a/app/src/error.rs +++ b/app/src/error.rs @@ -4,10 +4,10 @@ use thiserror::Error; #[derive(Error, Debug)] #[error("opds error")] pub enum Error { - /// Error rendering OPDS. + /// Database Error #[error("opds error")] DbError(#[from] DbErr), - /// Error fetching data from calibre. + /// Error fetching data from alertswiss #[error("data error")] FetchError(#[from] reqwest::Error), } diff --git a/app/src/main.rs b/app/src/main.rs index 3de8f14..13c655a 100644 --- a/app/src/main.rs +++ b/app/src/main.rs @@ -12,7 +12,7 @@ async fn main() { let config = args.into(); if let Err(e) = alert_me::run(config).await { - error!("Application error: {e}"); + error!("Application error: {e:?}"); process::exit(1); } }