Skip to content

Commit

Permalink
(dbt-labs#2511) Move opening connection message inside open method
Browse files Browse the repository at this point in the history
  • Loading branch information
southpolemonkey committed Jun 4, 2020
1 parent 1cd5118 commit 3f5cc22
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion core/dbt/adapters/base/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def set_connection_name(self, name: Optional[str] = None) -> Connection:
.format(conn.name)
)
else:
conn.handle = LazyHandle(self.open)
conn.handle = LazyHandle(self.open)

conn.name = conn_name
return conn
Expand All @@ -161,6 +161,11 @@ def open(cls, connection: Connection) -> Connection:
This should be thread-safe, or hold the lock if necessary. The given
connection should not be in either in_use or available.
"""
logger.debug(
'Opening a new connection, currently in state {}'
.format(connection.state)
)

raise dbt.exceptions.NotImplementedException(
'`open` is not implemented for this adapter!'
)
Expand Down

0 comments on commit 3f5cc22

Please sign in to comment.