Skip to content

Commit

Permalink
I forgot to delete the asserts
Browse files Browse the repository at this point in the history
  • Loading branch information
RobyBen committed Nov 24, 2024
1 parent 098b239 commit a8e2720
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions tap_postgres/tap.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,23 +50,6 @@ def __init__(
See https://github.com/MeltanoLabs/tap-postgres/issues/141
"""
super().__init__(*args, **kwargs)

# Add replication_slot_name validation
if self.config.get("replication_method") == "LOG_BASED" and self.config.get(
"replication_slot_name"
):
slot_name = self.config["replication_slot_name"]
assert (
slot_name.isalnum() or "_" in slot_name
), "Replication slot name must contain letters, numbers and underscores"
max_slot_name_len = 63
assert (
len(slot_name) <= max_slot_name_len
), "Replication slot name must be less than 63 characters"
assert not slot_name.startswith(
"pg_"
), "Replication slot name cannot start with 'pg_'"

assert (self.config.get("sqlalchemy_url") is not None) or (
self.config.get("host") is not None
and self.config.get("port") is not None
Expand Down

0 comments on commit a8e2720

Please sign in to comment.