refactor: move config defaults from TOML files to Default trait (#352)

This commit is contained in:
Sanchith Hegde
2023-01-17 19:13:16 +05:30
committed by GitHub
parent 4f6a8fcd9d
commit beb0384047
20 changed files with 589 additions and 169 deletions

View File

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