MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / shutdown

Method shutdown

lib/sqlalchemy/testing/engines.py:269–278  ·  view source on GitHub ↗
(self, stop=False)

Source from the content-addressed store, hash-verified

267 warnings.warn("ReconnectFixture couldn't close connection: %s" % e)
268
269 def shutdown(self, stop=False):
270 # TODO: this doesn't cover all cases
271 # as nicely as we'd like, namely MySQLdb.
272 # would need to implement R. Brewer's
273 # proxy server idea to get better
274 # coverage.
275 self.is_stopped = stop
276 for c in list(self.connections):
277 self._safe(c.close)
278 self.connections = []
279
280 def restart(self):
281 self.is_stopped = False

Calls 1

_safeMethod · 0.95