We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4ec3fdf commit cb7b285Copy full SHA for cb7b285
src/openstack_mcp_server/tools/base.py
@@ -1,5 +1,3 @@
1
-import atexit
2
-
3
import openstack
4
5
from openstack import connection
@@ -18,16 +16,8 @@ def get_connection(cls) -> connection.Connection:
18
16
if cls._connection is None:
19
17
openstack.enable_logging(debug=config.MCP_DEBUG_MODE)
20
cls._connection = openstack.connect(cloud=config.MCP_CLOUD_NAME)
21
- atexit.register(cls._cleanup)
22
return cls._connection
23
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
31
32
_openstack_connection_manager = OpenStackConnectionManager()
33
0 commit comments