fix: use multi-threaded runtime for email config lookup to avoid blocking
All checks were successful
BotServer CI/CD / build (push) Successful in 4m23s
All checks were successful
BotServer CI/CD / build (push) Successful in 4m23s
This commit is contained in:
parent
30bb764876
commit
597a962fbf
1 changed files with 2 additions and 1 deletions
|
|
@ -872,8 +872,9 @@ impl SecretsManager {
|
||||||
let (tx, rx) = std::sync::mpsc::channel();
|
let (tx, rx) = std::sync::mpsc::channel();
|
||||||
|
|
||||||
std::thread::spawn(move || {
|
std::thread::spawn(move || {
|
||||||
let rt = tokio::runtime::Builder::new_current_thread()
|
let rt = tokio::runtime::Builder::new_multi_thread()
|
||||||
.enable_all()
|
.enable_all()
|
||||||
|
.worker_threads(1)
|
||||||
.build();
|
.build();
|
||||||
let result = if let Ok(rt) = rt {
|
let result = if let Ok(rt) = rt {
|
||||||
rt.block_on(async move {
|
rt.block_on(async move {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue