fix: remove unused handle variable warning in get_database_url_sync
Some checks are pending
BotServer CI/CD / build (push) Waiting to run
Some checks are pending
BotServer CI/CD / build (push) Waiting to run
This commit is contained in:
parent
b628313b4c
commit
c2982f2a33
1 changed files with 1 additions and 1 deletions
|
|
@ -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()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue