feat: change async-bb8 fork and tokio spawn for concurrent database calls (#2774)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: akshay-97 <adiosphobian@gmail.com>
Co-authored-by: akshay.s <akshay.s@juspay.in>
Co-authored-by: Kartikeya Hegde <karthikey.hegde@juspay.in>
This commit is contained in:
Arun Raj M
2023-11-16 10:27:34 +05:30
committed by GitHub
parent 496245d990
commit d634fdeac3
69 changed files with 1516 additions and 721 deletions

View File

@ -4,7 +4,7 @@ use router::{
logger,
};
#[actix_web::main]
#[tokio::main]
async fn main() -> ApplicationResult<()> {
// get commandline config before initializing config
let cmd_line = <CmdLineConf as clap::Parser>::parse();
@ -43,7 +43,7 @@ async fn main() -> ApplicationResult<()> {
logger::info!("Application started [{:?}] [{:?}]", conf.server, conf.log);
#[allow(clippy::expect_used)]
let server = router::start_server(conf)
let server = Box::pin(router::start_server(conf))
.await
.expect("Failed to create the server");
let _ = server.await;