fix: remove unused handle variable warning in get_database_url_sync
Some checks are pending
BotServer CI/CD / build (push) Waiting to run

This commit is contained in:
Rodrigo Rodriguez (Pragmatismo) 2026-04-03 11:31:50 -03:00
parent b628313b4c
commit c2982f2a33

View file

@ -53,7 +53,7 @@ pub async fn get_database_url() -> Result<String> {
pub fn get_database_url_sync() -> Result<String> { pub fn get_database_url_sync() -> Result<String> {
let guard = SECRETS_MANAGER.read().map_err(|e| anyhow::anyhow!("Lock poisoned: {}", e))?; let guard = SECRETS_MANAGER.read().map_err(|e| anyhow::anyhow!("Lock poisoned: {}", e))?;
if let Some(ref manager) = *guard { if let Some(ref manager) = *guard {
if let Ok(handle) = tokio::runtime::Handle::try_current() { if tokio::runtime::Handle::try_current().is_ok() {
return tokio::task::block_in_place(|| { return tokio::task::block_in_place(|| {
let rt = tokio::runtime::Builder::new_current_thread() let rt = tokio::runtime::Builder::new_current_thread()
.enable_all() .enable_all()