From f6ad632c2d16d8645a2d84a8affd93f92fbb21b5 Mon Sep 17 00:00:00 2001 From: prplV Date: Wed, 5 Mar 2025 13:26:56 +0300 Subject: [PATCH] desctruct info for exporter --- crates/api-grub/src/export.rs | 7 +++++++ 1 file changed, 7 insertions(+) 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