Skip to content

Commit cb7b285

Browse files
committed
Remove: connection cleanup(Already support in opsntack SDK)
1 parent 4ec3fdf commit cb7b285

File tree

1 file changed

+0
-10
lines changed
  • src/openstack_mcp_server/tools

1 file changed

+0
-10
lines changed

src/openstack_mcp_server/tools/base.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import atexit
2-
31
import openstack
42

53
from openstack import connection
@@ -18,16 +16,8 @@ def get_connection(cls) -> connection.Connection:
1816
if cls._connection is None:
1917
openstack.enable_logging(debug=config.MCP_DEBUG_MODE)
2018
cls._connection = openstack.connect(cloud=config.MCP_CLOUD_NAME)
21-
atexit.register(cls._cleanup)
2219
return cls._connection
2320

24-
@classmethod
25-
def _cleanup(cls) -> None:
26-
"""Cleanup method called at program exit"""
27-
if cls._connection is not None:
28-
cls._connection.close()
29-
cls._connection = None
30-
3121

3222
_openstack_connection_manager = OpenStackConnectionManager()
3323

0 commit comments

Comments
 (0)