Skip to content

Commit

Permalink
fix: kill db settings defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
pjenvey committed Oct 26, 2023
1 parent 9657d2c commit 28cbe5a
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 30 deletions.
2 changes: 1 addition & 1 deletion autoconnect/autoconnect-ws/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ impl WSError {
self.kind.as_ref()
}

/// Emit an event for this Error to Sentry if set to
/// Emit an event for this Error to Sentry
pub fn capture_sentry_event(&self, client: Option<WebPushClient>) {
if !self.is_sentry_event() {
return;
Expand Down
20 changes: 0 additions & 20 deletions autopush-common/src/db/bigtable/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ use crate::db::error::DbError;

/// The settings for accessing the BigTable contents.
#[derive(Clone, Debug, Deserialize)]
#[serde(default)]
pub struct BigTableDbSettings {
/// The Table name matches the GRPC template for table paths.
/// e.g. `projects/{projectid}/instances/{instanceid}/tables/{tablename}`
Expand All @@ -48,25 +47,6 @@ pub struct BigTableDbSettings {
pub message_topic_family: String,
}

/// NOTE: autopush will not autogenerate these families. They should
/// be created when the table is first provisioned. See
/// [BigTable schema](https://cloud.google.com/bigtable/docs/schema-design)
///
/// BE SURE TO CONFIRM the names of the families. These are not checked on
/// initialization, but will throw errors if not present or incorrectly
/// spelled.
///
impl Default for BigTableDbSettings {
fn default() -> Self {
Self {
table_name: "autopush".to_owned(),
router_family: "router".to_owned(),
message_family: "message".to_owned(),
message_topic_family: "message_topic".to_owned(),
}
}
}

impl TryFrom<&str> for BigTableDbSettings {
type Error = DbError;
fn try_from(setting_string: &str) -> Result<Self, Self::Error> {
Expand Down
9 changes: 0 additions & 9 deletions autopush-common/src/db/dynamodb/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,6 @@ pub struct DynamoDbSettings {
pub message_table: String,
}

impl Default for DynamoDbSettings {
fn default() -> Self {
Self {
router_table: "router".to_string(),
message_table: "message".to_string(),
}
}
}

impl TryFrom<&str> for DynamoDbSettings {
type Error = DbError;
fn try_from(setting_string: &str) -> Result<Self, Self::Error> {
Expand Down

0 comments on commit 28cbe5a

Please sign in to comment.