refactor: incorporate hyperswitch_interface into drainer (#3629)

This commit is contained in:
Chethan Rao
2024-02-14 15:12:01 +05:30
committed by GitHub
parent 1236741a14
commit 7b1c65b60d
11 changed files with 156 additions and 81 deletions

View File

@ -15,7 +15,9 @@ async fn main() -> DrainerResult<()> {
conf.validate()
.expect("Failed to validate drainer configuration");
let store = services::Store::new(&conf, false).await;
let state = settings::AppState::new(conf.clone()).await;
let store = services::Store::new(&state.conf, false).await;
let store = std::sync::Arc::new(store);
#[cfg(feature = "vergen")]
@ -28,7 +30,7 @@ async fn main() -> DrainerResult<()> {
);
#[allow(clippy::expect_used)]
let web_server = Box::pin(start_web_server(conf.clone(), store.clone()))
let web_server = Box::pin(start_web_server(state.conf.as_ref().clone(), store.clone()))
.await
.expect("Failed to create the server");