MCPcopy Index your code
hub / github.com/google/adk-python / close

Method close

src/google/adk/runners.py:2113–2128  ·  view source on GitHub ↗

Closes the runner.

(self)

Source from the content-addressed store, hash-verified

2111 logger.error('Error closing toolset %s: %s', type(toolset).__name__, e)
2112
2113 async def close(self):
2114 """Closes the runner."""
2115 logger.info('Closing runner...')
2116 # Close Toolsets
2117 if self.agent is not None:
2118 await self._cleanup_toolsets(self._collect_toolset(self.agent))
2119
2120 # Close Plugins
2121 if self.plugin_manager:
2122 await self.plugin_manager.close()
2123
2124 # Close Session Service
2125 if self.session_service:
2126 await self.session_service.flush()
2127
2128 logger.info('Runner closed.')
2129
2130 if sys.version_info < (3, 11):
2131 Self = 'Runner' # pylint: disable=invalid-name

Callers 5

__aexit__Method · 0.95
run_asyncMethod · 0.95
run_interactivelyFunction · 0.95
run_once_cliFunction · 0.95
_cleanup_toolsetsMethod · 0.45

Calls 3

_cleanup_toolsetsMethod · 0.95
_collect_toolsetMethod · 0.95
flushMethod · 0.45

Tested by

no test coverage detected