|
@@ -476,8 +476,7 @@ struct Config {
|
|
|
conversations: Vec<ConversationConfig>,
|
|
|
}
|
|
|
|
|
|
-#[tokio::main(flavor = "current_thread")]
|
|
|
-async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|
|
+async fn main_worker() -> Result<(), Box<dyn std::error::Error>> {
|
|
|
#[cfg(feature = "tracing")]
|
|
|
console_subscriber::init();
|
|
|
|
|
@@ -516,6 +515,15 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|
|
Ok(())
|
|
|
}
|
|
|
|
|
|
+fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|
|
+ tokio::runtime::Builder::new_multi_thread()
|
|
|
+ .worker_threads(2)
|
|
|
+ .enable_all()
|
|
|
+ .build()
|
|
|
+ .unwrap()
|
|
|
+ .block_on(main_worker())
|
|
|
+}
|
|
|
+
|
|
|
#[cfg(test)]
|
|
|
mod tests {
|
|
|
use super::*;
|