diff --git a/crates/api-grub/src/export.rs b/crates/api-grub/src/export.rs index 9e8e429..d649134 100644 --- a/crates/api-grub/src/export.rs +++ b/crates/api-grub/src/export.rs @@ -5,6 +5,7 @@ use tokio_postgres::NoTls; use std::env; use anyhow::Result; use log::{info, error}; +use std::ops::Drop; /// An entity which handles DB connections. /// @@ -101,4 +102,10 @@ impl Exporter { Ok(metrics.get_bytes_len()) } +} + +impl Drop for Exporter { + fn drop(&mut self) { + info!("Deinitializng Exporter and DB connection pool ...") + } } \ No newline at end of file