Skip to content

Commit

Permalink
chore(notifications): remove direct_connection option
Browse files Browse the repository at this point in the history
  • Loading branch information
bodymindarts committed Jan 16, 2024
1 parent 66da425 commit 07f0f25
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
3 changes: 0 additions & 3 deletions core/notifications/src/data_import/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,13 @@ use serde::{Deserialize, Serialize};

#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct MongoImportConfig {
/// This is to connect via port forwarding when testing against staging
pub direct_connection: Option<bool>,
pub execute_import: bool,
pub connection: String,
}

impl Default for MongoImportConfig {
fn default() -> Self {
Self {
direct_connection: None,
execute_import: false,
connection: "mongodb://localhost:27017/galoy".to_string(),
}
Expand Down
1 change: 0 additions & 1 deletion core/notifications/src/data_import/mongodb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use mongodb::{

pub async fn get_client(mongodb_config: MongoImportConfig) -> anyhow::Result<Client> {
let mut client_options = ClientOptions::parse(mongodb_config.connection).await?;
client_options.direct_connection = Some(mongodb_config.direct_connection.unwrap_or(false));
client_options.selection_criteria = Some(SelectionCriteria::ReadPreference(
ReadPreference::SecondaryPreferred {
options: ReadPreferenceOptions::default(),
Expand Down

0 comments on commit 07f0f25

Please sign in to comment.