Skip to content

Commit 1670b83

Browse files
committed
chore(cloud-sql): update comments for connector initialization
1 parent fcda182 commit 1670b83

File tree

5 files changed

+2
-24
lines changed

5 files changed

+2
-24
lines changed

cloud-sql/mysql/sqlalchemy/connect_connector.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,7 @@ def connect_with_connector() -> sqlalchemy.engine.base.Engine:
4141

4242
ip_type = IPTypes.PRIVATE if os.environ.get("PRIVATE_IP") else IPTypes.PUBLIC
4343

44-
# setting the refresh strategy to LAZY
45-
# to refresh the tokens when they are needed, rather than on a regular interval
46-
# this is recommended for serverless environments to
47-
# avoid background refreshes from throttling CPU.
48-
44+
# initialize Cloud SQL Python Connector object
4945
connector = Connector(ip_type=ip_type, refresh_strategy="LAZY")
5046

5147
def getconn() -> pymysql.connections.Connection:

cloud-sql/mysql/sqlalchemy/connect_connector_auto_iam_authn.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,6 @@ def connect_with_connector_auto_iam_authn() -> sqlalchemy.engine.base.Engine:
3939

4040
ip_type = IPTypes.PRIVATE if os.environ.get("PRIVATE_IP") else IPTypes.PUBLIC
4141

42-
# setting the refresh strategy to LAZY
43-
# to refresh the tokens when they are needed, rather than on a regular interval
44-
# this is recommended for serverless environments to
45-
# avoid background refreshes from throttling CPU.
46-
4742
# initialize Cloud SQL Python Connector object
4843
connector = Connector(refresh_strategy="LAZY")
4944

cloud-sql/postgres/sqlalchemy/connect_connector.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,6 @@ def connect_with_connector() -> sqlalchemy.engine.base.Engine:
4141

4242
ip_type = IPTypes.PRIVATE if os.environ.get("PRIVATE_IP") else IPTypes.PUBLIC
4343

44-
# setting the refresh strategy to LAZY
45-
# to refresh the tokens when they are needed, rather than on a regular interval
46-
# this is recommended for serverless environments to
47-
# avoid background refreshes from throttling CPU.
48-
4944
# initialize Cloud SQL Python Connector object
5045
connector = Connector(refresh_strategy="LAZY")
5146

cloud-sql/postgres/sqlalchemy/connect_connector_auto_iam_authn.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,6 @@ def connect_with_connector_auto_iam_authn() -> sqlalchemy.engine.base.Engine:
3939

4040
ip_type = IPTypes.PRIVATE if os.environ.get("PRIVATE_IP") else IPTypes.PUBLIC
4141

42-
# setting the refresh strategy to LAZY
43-
# to refresh the tokens when they are needed, rather than on a regular interval
44-
# this is recommended for serverless environments to
45-
# avoid background refreshes from throttling CPU.
4642
# initialize Cloud SQL Python Connector object
4743
connector = Connector(refresh_strategy="LAZY")
4844

cloud-sql/sql-server/sqlalchemy/connect_connector.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,7 @@ def connect_with_connector() -> sqlalchemy.engine.base.Engine:
4141

4242
ip_type = IPTypes.PRIVATE if os.environ.get("PRIVATE_IP") else IPTypes.PUBLIC
4343

44-
# setting the refresh strategy to LAZY
45-
# to refresh the tokens when they are needed, rather than on a regular interval
46-
# this is recommended for serverless environments to
47-
# avoid background refreshes from throttling CPU.
48-
44+
# initialize Cloud SQL Python Connector object
4945
connector = Connector(ip_type=ip_type, refresh_strategy="LAZY")
5046

5147
connect_args = {}

0 commit comments

Comments
 (0)