diff --git a/backend/config/initializers/sentry.rb b/backend/config/initializers/sentry.rb index 1e1a223..fdd7bf5 100644 --- a/backend/config/initializers/sentry.rb +++ b/backend/config/initializers/sentry.rb @@ -9,5 +9,13 @@ config.breadcrumbs_logger = [:active_support_logger] config.traces_sample_rate = traces_sample_rate + + config.before_send = lambda do |event, hint| + if hint[:exception].is_a?(ActiveRecord::ConnectionTimeoutError) + nil + else + event + end + end end end diff --git a/sub-image/src/routes.rs b/sub-image/src/routes.rs index 747c298..0be6e03 100644 --- a/sub-image/src/routes.rs +++ b/sub-image/src/routes.rs @@ -78,7 +78,7 @@ pub async fn convert_post( let img = image::imageops::crop(&mut rendered, 0, 145, 2048, 970).to_image(); image::imageops::resize( &img, - (2048 / 970) * 720, + ((2048f64 / 970f64) * 720f64) as _, 720, image::imageops::FilterType::Gaussian, ) @@ -88,7 +88,7 @@ pub async fn convert_post( let img = image::imageops::crop(&mut rendered, 0, 135, 2048, 897).to_image(); image::imageops::resize( &img, - (2048 / 897) * 720, + ((2048f64 / 897f64) * 720f64) as _, 720, image::imageops::FilterType::Gaussian, )