fix: add graceful shutdown for consumer & router (#428)

This commit is contained in:
Nishant Joshi
2023-01-20 16:25:56 +05:30
committed by GitHub
parent 30593bd1fd
commit 25d8ec2009
9 changed files with 159 additions and 75 deletions

View File

@ -120,6 +120,7 @@ pub async fn start_server(conf: settings::Settings) -> ApplicationResult<(Server
let server = actix_web::HttpServer::new(move || mk_app(state.clone(), request_body_limit))
.bind((server.host.as_str(), server.port))?
.workers(server.workers)
.shutdown_timeout(server.shutdown_timeout)
.run();
Ok((server, app_state))