Skip to content

Commit

Permalink
chore: Flush logger hanlders at exit
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon committed Nov 26, 2024
1 parent 3fc2911 commit def1ae1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tap_postgres/tap.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,8 @@ def ssh_tunnel_connect(self, *, ssh_config: dict[str, Any], url: URL) -> URL:
def clean_up(self) -> None:
"""Stop the SSH Tunnel."""
self.logger.info("Shutting down SSH Tunnel")
for handler in self.logger.handlers:
handler.close()
self.ssh_tunnel.stop()

def catch_signal(self, signum, frame) -> None:
Expand Down

0 comments on commit def1ae1

Please sign in to comment.