@@ -14,7 +14,7 @@ async fn main() -> std::io::Result<()> {
|
||||
let app_state = AppState::new().await;
|
||||
|
||||
let app_state_clone = app_state.clone();
|
||||
|
||||
|
||||
// Используем spawn_blocking для работы, которая не совместима с Send
|
||||
spawn_blocking(move || {
|
||||
let rt = tokio::runtime::Handle::current();
|
||||
@@ -34,4 +34,4 @@ async fn main() -> std::io::Result<()> {
|
||||
.bind("127.0.0.1:8080")?
|
||||
.run()
|
||||
.await
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user