mirror of
https://github.com/Xevion/banner.git
synced 2026-01-31 08:23:35 -06:00
feat: implement comprehensive retry mechanism and improve observability
Add retry tracking to scrape jobs with configurable max retries (default 5), implement automatic database migrations on startup, and significantly reduce logging noise from infrastructure layers. Enhanced tracing with structured spans for better debugging while keeping output readable by suppressing verbose trace logs from rate limiters and session management. Improved error handling with detailed retry context and proper session cookie validation.
This commit is contained in:
@@ -62,6 +62,14 @@ impl App {
|
||||
"database pool established"
|
||||
);
|
||||
|
||||
// Run database migrations
|
||||
info!("Running database migrations...");
|
||||
sqlx::migrate!("./migrations")
|
||||
.run(&db_pool)
|
||||
.await
|
||||
.expect("Failed to run database migrations");
|
||||
info!("Database migrations completed successfully");
|
||||
|
||||
// Create BannerApi and AppState
|
||||
let banner_api = BannerApi::new_with_config(
|
||||
config.banner_base_url.clone(),
|
||||
|
||||
Reference in New Issue
Block a user