File tree Expand file tree Collapse file tree 5 files changed +2
-24
lines changed
Expand file tree Collapse file tree 5 files changed +2
-24
lines changed Original file line number Diff line number Diff 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 :
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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 = {}
You can’t perform that action at this time.
0 commit comments